mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
new Date().getTime() to Date.now()
This commit is contained in:
parent
7670d2073d
commit
1b811428e7
3 changed files with 5 additions and 5 deletions
|
|
@ -255,7 +255,7 @@ export function getUploadErrorDescByCode(code) {
|
|||
* @param {string} language
|
||||
*/
|
||||
export function reload(admin, language) {
|
||||
const start = new Date().getTime();
|
||||
const start = Date.now();
|
||||
|
||||
$htmlCL.add('rl-changing-language');
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ export function reload(admin, language) {
|
|||
|
||||
resolve();
|
||||
},
|
||||
500 < (new Date().getTime()) - start ? 1 : 500
|
||||
500 < Date.now() - start ? 1 : 500
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const __set = (key, value) => {
|
|||
}
|
||||
};
|
||||
|
||||
const timestamp = () => Math.round(new Date().getTime() / 1000);
|
||||
const timestamp = () => Math.round(Date.now() / 1000);
|
||||
|
||||
const setTimestamp = () => __set(TIME_KEY, timestamp());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue