←back to thread

setBigTimeout

(evanhahn.com)
210 points cfj | 3 comments | | HN request time: 0s | source
Show context
miiiiiike ◴[] No.41880787[source]
Got hit with this one a few months ago.
replies(2): >>41880846 #>>41880864 #
1. graypegg ◴[] No.41880846[source]
Just out of curiosity, what was the use case for a really long timeout? Feels like most if not all long timeouts would be best served with some sort of "job" you could persist, rather than leaving it in the event queue.
replies(1): >>41881134 #
2. cout ◴[] No.41881134[source]
https://thedailywtf.com/articles/The_Harbinger_of_the_Epoch_
replies(1): >>41881210 #
3. graypegg ◴[] No.41881210[source]
To be fair, this will be fixed by browsers when it's within spitting distance of the scale of numbers setTimeout is normally used with. (not huge numbers) Like, if it's close enough that setTimeout(() => {}, 5000) will stop working a month later, that would be a major failure on the browser vendor's part. Much too close for comfort.

But I totally understand it not being a priority if the situation is: setTimeout(() => {}, 500000000) not working in X years.