}
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') {
- return performance.timing.navigationStart + performance.now();
- }
-
- if (typeof Microtime !== 'undefined') {
- return Microtime.nowDouble() * 1000;
- }
-
- return Date.now();
+ this.constructor.now();
},
_levelString : function (level) {