Moved time function to shared
This commit is contained in:
@@ -340,12 +340,4 @@ export class InverseClient extends SharedEndpoints {
|
|||||||
}): GenericAPIResponse {
|
}): GenericAPIResponse {
|
||||||
return this.requestWrapper.get('v2/private/account/lcp', params);
|
return this.requestWrapper.get('v2/private/account/lcp', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTimeOffset(): Promise<number> {
|
|
||||||
const start = Date.now();
|
|
||||||
return this.getServerTime().then(result => {
|
|
||||||
const end = Date.now();
|
|
||||||
return Math.ceil((result.time_now * 1000) - end + ((end - start) / 2));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user