Bug 1063559 - Convert TelemetryStopwatch.jsm to use Components.utils.now(). r=irving

This commit is contained in:
Manu Jain 2014-09-08 09:04:00 -04:00
parent 3a5b415c8d
commit 41efdd1953

View File

@ -54,7 +54,7 @@ this.TelemetryStopwatch = {
return false;
}
timers[aHistogram] = Date.now();
timers[aHistogram] = Components.utils.now();
return true;
},
@ -117,7 +117,8 @@ this.TelemetryStopwatch = {
delete timers[aHistogram];
if (start) {
let delta = Date.now() - start;
let delta = Components.utils.now() - start;
delta = Math.round(delta);
let histogram = Telemetry.getHistogramById(aHistogram);
histogram.add(delta);
return true;