later
later copied to clipboard
setTimeout and setInterval trigger too early for long delays
For delays longer than 2^31-1 milliseconds (which is approximately 24.9 days) later.setTimeout and later.setInterval trigger too early, namely right after those 2^31-1 milliseconds. While this behaviour is better than triggering immediately, as the native timers of most JavaScript environments do, it is not very nice.
How about using an approach similar to https://github.com/tellnes/long-timeout?
I'd gladly take a patch. I don't have time at the moment to look into this.