mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
update token
This commit is contained in:
@@ -401,6 +401,24 @@ export class ChatService {
|
||||
}
|
||||
|
||||
|
||||
lastUpdateIs10sAgo() {
|
||||
const currentTime: any = new Date();
|
||||
|
||||
const diffTime = Math.abs(currentTime - this.timerEventTriggerDateLastUpdate);
|
||||
|
||||
if(this.timerEventTriggerDateLastUpdate == null) {
|
||||
return true
|
||||
}
|
||||
|
||||
if(diffTime >= 5000) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
}
|
||||
|
||||
|
||||
functionTimer = null;
|
||||
timerEventTriggerDate = null
|
||||
timerEventTriggerDateLastUpdate = null
|
||||
@@ -410,7 +428,6 @@ export class ChatService {
|
||||
this.timerEventTriggerDate = new Date(+new Date() + 60000*15);
|
||||
|
||||
this.functionTimer = setTimeout(() => {
|
||||
this.timerEventTriggerDateLastUpdate = new Date();
|
||||
this.refreshtoken();
|
||||
}, 60000 * 5); // time is in milliseconds
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user