joyent/node — pull request #8067 by chrisdickinson (2014-08-04 00:54:49+00:00)
Title: timers: float delays can cause 100% cpu usage.

The changes in befbbad switch all comparisons over to unsigned
integer comparisons, but in certain cases list.msecs will be fractional.
If this is the case, the timer will never be removed from the list.
This fixes the issue by casting msecs to an integer by rounding up
or down.

Fixes 8065.

--------

I might need some advice on how best to test this. The below script will intermittently freeze and block the event loop, but I can't reliably trigger this behavior 100% of the time -- there is a small percentage of times where it'll run to completion.

```javascript
setTimeout(function() {
console.log('ummm')
}, 100.3)

setTimeout(function() {
console.log('ERRRR')
}, 4.3)

setTimeout(function() {
console.log('ok')
}, 100)
```