or what

  • Solid comparisons
    ```
    var date = new Date();
    var time = 7200 - date.getMinutes() * 60 - date.getSeconds();

countTime(time)

function countTime(time) {
var timer = null;
if (time > 0) {

  timer = setInterval(function () {
    var h = Math.floor(time / 3600);
    var m = Math.floor((time / 60)) - h * 60;
    var s = time % 3600 - m * 60;


    time--;
  }, 1000)
} else {
  time = null;
}

}
```

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325297863&siteId=291194637