mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-23 00:37:29 +08:00
hopefully helped the timer drift a bit
This commit is contained in:
parent
6dfeb0388b
commit
16974cba43
|
@ -159,7 +159,7 @@ function checkIfTimeIsUp() {
|
|||
|
||||
// ---------------------------------------
|
||||
|
||||
function timerStep() {
|
||||
async function timerStep() {
|
||||
time++;
|
||||
premid();
|
||||
updateTimer();
|
||||
|
@ -196,6 +196,7 @@ export function start() {
|
|||
expected += stepIntervalMS;
|
||||
let delay = Math.max(0, stepIntervalMS - dt);
|
||||
if (timerDebug) console.log(`deltatime ${dt}ms`);
|
||||
if (timerDebug) console.log(`delay ${delay}ms`);
|
||||
setTimeout(loop, delay);
|
||||
}
|
||||
expected = TestStats.start + stepIntervalMS;
|
||||
|
|
Loading…
Reference in a new issue