Prechádzať zdrojové kódy

Utilisation substr à la place de division

Pour etre constant peut importe si le timestamp comporte des millisecondes
Loquicom 5 rokov pred
rodič
commit
a407a3ed2c
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      src/timer.js

+ 2 - 2
src/timer.js

@@ -33,9 +33,9 @@ const timer = class Timer {
     }
 
     _timestamp() {
-        return parseInt(Date.now() / 1000);
+        return parseInt(Date.now().toString().substr(0, 10));
     }
 
 };
 
-module.exports = new timer();
+module.exports = new timer();