Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

process.hrtime() jumps around on Windows XP #5327

Closed
net147 opened this issue Apr 18, 2013 · 1 comment
Closed

process.hrtime() jumps around on Windows XP #5327

net147 opened this issue Apr 18, 2013 · 1 comment

Comments

@net147
Copy link

net147 commented Apr 18, 2013

setInterval(function() {
    console.log(process.hrtime());
}, 100);

[ 1388, 737240389 ]
[ 1388, 836848459 ]
[ 1388, 932565113 ]
[ 1389, 35112821 ]
[ 1389, 127897638 ]
[ 1387, 301837017 ]
[ 1387, 401455988 ]
[ 1387, 497171560 ]
[ 1387, 599717820 ]
[ 1387, 692502002 ]
[ 1387, 798958078 ]
[ 1387, 898569704 ]
[ 1387, 994284289 ]
[ 1388, 96832052 ]
[ 1388, 189614538 ]
[ 1388, 299969454 ]
[ 1388, 399585722 ]
[ 1388, 495306586 ]
[ 1388, 597853659 ]
[ 1388, 690633640 ]
[ 1388, 801003856 ]
[ 1388, 900610275 ]
[ 1388, 996323566 ]
[ 1389, 98877627 ]
[ 1389, 191653284 ]
[ 1391, 660561184 ]
[ 1391, 760180090 ]
[ 1391, 855901803 ]
[ 1391, 958492995 ]
[ 1392, 51228123 ]

Node v0.10.4

@bnoordhuis
Copy link
Member

That's a known issue: timer granularity on Windows is very coarse. See joyent/libuv#785 for a... well, "fix" doesn't quite do it justice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants