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

Unified Diff: mojo/apps/js/bindings/monotonic_clock.cc

Issue 614893002: use base::Time constants in mojo instead of defining locally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: indented properly Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/bindings/monotonic_clock.cc
diff --git a/mojo/apps/js/bindings/monotonic_clock.cc b/mojo/apps/js/bindings/monotonic_clock.cc
index 733af8a69e2263601124db105a0e6ae0c30c4d01..2d75905d240d05be687f38ea534d3011c74d1ff4 100644
--- a/mojo/apps/js/bindings/monotonic_clock.cc
+++ b/mojo/apps/js/bindings/monotonic_clock.cc
@@ -4,6 +4,7 @@
#include "mojo/apps/js/bindings/monotonic_clock.h"
+#include "base/time/time.h"
#include "gin/object_template_builder.h"
#include "gin/per_isolate_data.h"
#include "gin/public/wrapper_info.h"
@@ -17,8 +18,8 @@ namespace {
gin::WrapperInfo g_wrapper_info = { gin::kEmbedderNativeGin };
double GetMonotonicSeconds() {
- const double kMicrosecondsPerSecond = 1000000;
- return static_cast<double>(mojo::GetTimeTicksNow()) / kMicrosecondsPerSecond;
+ return static_cast<double>(mojo::GetTimeTicksNow()) /
+ base::Time::kMicrosecondsPerSecond;
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698