diff options
| author | Ben Beltran <ben@freshout.us> | 2013-04-05 13:22:08 -0600 |
|---|---|---|
| committer | Ben Beltran <ben@freshout.us> | 2013-04-05 13:22:08 -0600 |
| commit | 95239994bffa025ebd0d6dc98b34f211fb7c8cc1 (patch) | |
| tree | 8284215ebae2f501e907a878cc175f32dd79d577 /lib | |
| parent | 4ee070b17b6c3bf561f77b6f56ee306d94f775b3 (diff) | |
Add microtime, because hrtime() wasn't right
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/cobalt.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/cobalt.js b/lib/cobalt.js index c832c7f..771c9c7 100644 --- a/lib/cobalt.js +++ b/lib/cobalt.js @@ -6,6 +6,7 @@ var Ne = require('neon'); Module = Ne.Module; Class = Ne.Class; + var Microtime = require('microtime'); } else { Module = global.Module; Class = global.Class; @@ -207,8 +208,8 @@ return performance.timing.navigationStart + performance.now(); } - if (typeof process !== 'undefined') { - return process.hrtime(); + if (typeof Microtime !== 'undefined') { + return Microtime.nowDouble() * 1000; } return Date.now(); |