Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1614)

Unified Diff: content/renderer/stats_collection_controller.cc

Issue 557953006: Avoid using ToInternalValue in computing timings, so that the timings are consistent accross platfo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/startup_metric_utils/startup_metric_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/stats_collection_controller.cc
diff --git a/content/renderer/stats_collection_controller.cc b/content/renderer/stats_collection_controller.cc
index 713407942a7f95b34d8e00cf452882b57a3f1bcc..81c01dda6f482c57027cc0e8b11bef2c61e0cb32 100644
--- a/content/renderer/stats_collection_controller.cc
+++ b/content/renderer/stats_collection_controller.cc
@@ -57,7 +57,8 @@ void ConvertLoadTimeToJSON(
if (load_start_time.is_null()) {
item.Set("load_start_ms", base::Value::CreateNullValue());
} else {
- item.SetDouble("load_start_ms", load_start_time.ToInternalValue() / 1000);
+ item.SetDouble("load_start_ms", (load_start_time - base::Time::UnixEpoch())
+ .InMillisecondsF());
}
if (load_start_time.is_null() || load_stop_time.is_null()) {
item.Set("load_duration_ms", base::Value::CreateNullValue());
« no previous file with comments | « components/startup_metric_utils/startup_metric_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698