mirror of
https://github.com/danbulant/ester_os
synced 2026-05-21 05:08:31 +00:00
Fix setInterval callback
This commit is contained in:
parent
4f4415e6dc
commit
419e1f3373
1 changed files with 2 additions and 2 deletions
|
|
@ -6,13 +6,13 @@ class Login extends React.Component{
|
|||
constructor(p){
|
||||
super(p)
|
||||
let date = new Date();
|
||||
setTimeout(() => {
|
||||
setTimeout(function func(){
|
||||
let date = new Date();
|
||||
let time = date.getHours().toString().padStart(2, "0") + ":" + date.getMinutes().toString().padStart(2, "0");
|
||||
this.state = {
|
||||
time
|
||||
};
|
||||
setInterval(this, 60000);
|
||||
setInterval(func, 60000);
|
||||
}, (60 - date.getSeconds()) * 1000);
|
||||
|
||||
let time = date.getHours().toString().padStart(2, "0") + ":" + date.getMinutes().toString().padStart(2, "0");
|
||||
|
|
|
|||
Loading…
Reference in a new issue