←back to thread

setBigTimeout

(evanhahn.com)
210 points cfj | 4 comments | | HN request time: 0.729s | source
1. n_plus_1_acc ◴[] No.41885880[source]
In response to this, I read the spec of setTimeout, bu I couldn't find the part where implementations may have an upper bound. Can someone more familiär with the specs point me in the right direction?
replies(2): >>41886179 #>>41887986 #
2. zeven7 ◴[] No.41886179[source]
Adding a comment here to check back later because I'm curious now if someone has the answer. I thought it would be easy to find the answer, but I can't find it either. I figured it would say somewhere a number is converted to an int32, but instead I got to the part where there's a map of active timers[1] with the time stored as a double[2] without seeing a clear loss happening anywhere before that.

[1] https://html.spec.whatwg.org/multipage/timers-and-user-promp...

[2] https://w3c.github.io/hr-time/#dom-domhighrestimestamp

3. vilius ◴[] No.41887986[source]
Here’s a deep dive in 6 minutes https://youtu.be/boD0ReK62FI?si=jSXuQn0DHn3riJgd

Just JS being JS: setTimeout(()=>{}, Infinity) executes immediately

replies(1): >>41901148 #
4. n_plus_1_acc ◴[] No.41901148[source]
Thanks, but I'm looking for the specification of this behaviour.