The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / test / simple / test-timers.js @ 6f043940

History | View | Annotate | Download (2 KB)

# Date Author Comment
0c47219a 07/05/2012 05:07 PM Ben Noordhuis

timers: fix handling of large timeouts

Don't use the double-negate trick to coalesce the timeout argument into a
number, it produces the wrong result for very large timeouts.

Example:

setTimeout(cb, 1e10); // doesn't work, ~~1e10 == 1410065408
7fc835af 03/15/2012 04:56 PM Ben Noordhuis

timers: handle negative or non-numeric timeout values

Follows browser behaviour by scheduling the callback on the next tick.

Fixes #593.