aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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();