X-Git-Url: https://git.r.bdr.sh/rbdr/cologne/blobdiff_plain/25d73f5e66b2e4e830491396d44d5fd756a29b8d..963cb46b688216154f1299c233832258be5f5bbd:/lib/cobalt.js diff --git a/lib/cobalt.js b/lib/cobalt.js index 9554a04..58a305c 100644 --- a/lib/cobalt.js +++ b/lib/cobalt.js @@ -27,7 +27,7 @@ } Cobalt.now = function () { - if (typeof performance !== 'undefined') { + if (typeof performance !== 'undefined' && performance.timing) { return performance.timing.navigationStart + performance.now(); } @@ -239,15 +239,7 @@ // Returns the current time in microseconds. now : function () { - if (typeof performance !== 'undefined') { - return performance.timing.navigationStart + performance.now(); - } - - if (typeof Microtime !== 'undefined') { - return Microtime.nowDouble() * 1000; - } - - return Date.now(); + this.constructor.now(); }, _levelString : function (level) {