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

Unified Diff: sky/viewer/platform/platform_impl.cc

Issue 887883002: WTF should get time from base directly (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/viewer/platform/platform_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/platform/platform_impl.cc
diff --git a/sky/viewer/platform/platform_impl.cc b/sky/viewer/platform/platform_impl.cc
index ace59a38379dcbfe7c96c930ec7f63443c6bd451..5674e54f57d11c16f4ab029fa50ffd6de5c40401 100644
--- a/sky/viewer/platform/platform_impl.cc
+++ b/sky/viewer/platform/platform_impl.cc
@@ -59,22 +59,16 @@ blink::WebString PlatformImpl::defaultLocale() {
return blink::WebString::fromUTF8("en-US");
}
-double PlatformImpl::currentTime() {
- return base::Time::Now().ToDoubleT();
-}
-
-double PlatformImpl::monotonicallyIncreasingTime() {
- return base::TimeTicks::Now().ToInternalValue() /
- static_cast<double>(base::Time::kMicrosecondsPerSecond);
-}
-
void PlatformImpl::setSharedTimerFiredFunction(void (*func)()) {
shared_timer_func_ = func;
}
void PlatformImpl::setSharedTimerFireInterval(
double interval_seconds) {
- shared_timer_fire_time_ = interval_seconds + monotonicallyIncreasingTime();
+ double now = base::TimeTicks::Now().ToInternalValue() /
+ static_cast<double>(base::Time::kMicrosecondsPerSecond);
+
+ shared_timer_fire_time_ = interval_seconds + now;
if (shared_timer_suspended_) {
shared_timer_fire_time_was_set_while_suspended_ = true;
return;
« no previous file with comments | « sky/viewer/platform/platform_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698