←back to thread

setBigTimeout

(evanhahn.com)
210 points cfj | 1 comments | | HN request time: 0.281s | source
Show context
bufferoverflow ◴[] No.41885979[source]
setTimeout is stranger than you think.

We recently had a failed unit test because setTimeout(fn, 1000) triggered at 999ms. That test had ran more than a hundred times before just fine. Till one day it didn't.

replies(5): >>41885984 #>>41886191 #>>41886471 #>>41886483 #>>41886563 #
1. jonathanlydall ◴[] No.41885984[source]
Interesting.

Maybe the system clock did a network time synchronisation during the setTimeout window.