]> git.r.bdr.sh - rbdr/cologne/blobdiff - lib/cobalt.js
Proper nows now
[rbdr/cologne] / lib / cobalt.js
index 9554a04ad248b7f3ef06412448e8aa387de350b1..17e694864606a70694840543ae9ab1ffa2f61c3e 100644 (file)
@@ -27,7 +27,7 @@
   }
 
   Cobalt.now = function () {
-    if (typeof performance !== 'undefined') {
+    if (typeof performance !== 'undefined' && performance.timing) {
       return performance.timing.navigationStart + performance.now();
     }
 
 
       // Returns the current time in microseconds.
       now : function () {
-        if (typeof performance !== 'undefined') {
+        if (typeof performance !== 'undefined' && performance.timing) {
           return performance.timing.navigationStart + performance.now();
         }