Moved time function to shared

This commit is contained in:
peepopoggers
2021-01-28 23:39:47 +00:00
parent c59d6c1412
commit 0fe804413b

View File

@@ -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));
});
}
}; };