mirror of https://github.com/lukechilds/node.git
Browse Source
Record the start time so we can make the return value of Timer.now() relative to it, increasing the chances that it fits in a tagged integer instead of a heap-allocated double, at least for the first one or two billion milliseconds. PR-URL: https://github.com/nodejs/io.js/pull/2256 Reviewed-By: Trevor Norris <trev.norris@gmail.com>v4.0.0-rc
Ben Noordhuis
10 years ago
4 changed files with 17 additions and 0 deletions
@ -0,0 +1,8 @@ |
|||
'use strict'; |
|||
|
|||
const common = require('../common'); |
|||
const assert = require('assert'); |
|||
|
|||
// Return value of Timer.now() should easily fit in a SMI right after start-up.
|
|||
const Timer = process.binding('timer_wrap').Timer; |
|||
assert(Timer.now() < 0x3ffffff); |
Loading…
Reference in new issue