aboutsummaryrefslogtreecommitdiff
path: root/lib/cobalt.js
diff options
context:
space:
mode:
authorBen Beltran <ben@freshout.us>2013-04-05 13:22:08 -0600
committerBen Beltran <ben@freshout.us>2013-04-05 13:22:08 -0600
commit9f9564be72fe27b823713f6e104343c4affadb42 (patch)
tree77a0838bbfb68bb06495acd7fb5cc5d2d2b0c767 /lib/cobalt.js
parentfaf177fa8ddb796858f4397749c83db9386b3c5c (diff)
Add microtime, because hrtime() wasn't right
Diffstat (limited to 'lib/cobalt.js')
-rw-r--r--lib/cobalt.js5
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();