new Date().getTime() to Date.now()

This commit is contained in:
djmaze 2020-08-17 21:35:03 +02:00
parent 7670d2073d
commit 1b811428e7
3 changed files with 5 additions and 5 deletions

View file

@ -130,7 +130,7 @@ class AbstractAjaxRemote {
ajaxRequest(fResultCallback, params, iTimeOut = 20000, sGetAdd = '', abortActions = []) {
params = params || {};
const isPost = !sGetAdd,
start = new Date().getTime(),
start = Date.now(),
action = params.Action || '';
if (action && abortActions) {
@ -181,7 +181,7 @@ class AbstractAjaxRemote {
.then(oData => {
let cached = false;
if (oData && oData.Time) {
cached = pInt(oData.Time) > new Date().getTime() - start;
cached = pInt(oData.Time) > Date.now() - start;
}
if (oData && oData.UpdateToken) {