mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Time limit improvements
This commit is contained in:
parent
d2c16381e2
commit
338f18d2af
3 changed files with 38 additions and 22 deletions
|
|
@ -54,21 +54,21 @@ class RainLoopStorage
|
|||
return window.Math.round((new Date()).getTime() / 1000);
|
||||
}
|
||||
|
||||
init() {
|
||||
checkTimestamp() {
|
||||
|
||||
const
|
||||
six = 1000 * 60 * 6, // 6m
|
||||
now = this.timestamp()
|
||||
;
|
||||
|
||||
if (now > this.getTimestamp() + six * 10)
|
||||
if (this.timestamp() > this.getTimestamp() + 1000 * 60 * 60) // 60m
|
||||
{
|
||||
this.clearHash();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
init() {
|
||||
window.setInterval(() => {
|
||||
this.setTimestamp();
|
||||
}, six);
|
||||
}, 1000 * 60); // 1m
|
||||
}
|
||||
|
||||
getHash() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue