Fix time synchronization with server
- avoid that client time being ahead of server time
This commit is contained in:
@@ -43,7 +43,7 @@ module.exports = class Request {
|
||||
const result = await this.get('/v2/public/time');
|
||||
const end = Date.now();
|
||||
|
||||
return Math.ceil((result.time_now * 1000) - start + ((end - start) / 2));
|
||||
return Math.ceil((result.time_now * 1000) - end + ((end - start) / 2));
|
||||
}
|
||||
|
||||
async _call(method, endpoint, params) {
|
||||
|
||||
Reference in New Issue
Block a user