src: fix negative values in process.hrtime() · nodejs/node@dcafe71 · GitHub
Skip to content

Commit dcafe71

Browse files
committed
src: fix negative values in process.hrtime()
Fix a regression introduced in commit 89f056b ("node: improve performance of hrtime()") where the nanosecond field sometimes had a negative value when calculating the difference between two timestamps. Fixes: #4751
1 parent c9dbd2b commit dcafe71

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/node.js

Lines changed: 3 additions & 4 deletions

test/parallel/test-process-hrtime.js

Lines changed: 3 additions & 0 deletions

0 commit comments

Comments
 (0)