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

Unified Diff: third_party/WebKit/Source/platform/Timer.cpp

Issue 1727103002: Revert of Per WebViewScheduler virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « third_party/WebKit/Source/platform/Timer.h ('k') | third_party/WebKit/Source/platform/TimerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/Timer.cpp
diff --git a/third_party/WebKit/Source/platform/Timer.cpp b/third_party/WebKit/Source/platform/Timer.cpp
index 9e688ddeb22dc604e1a84492f7eec73008c1f14a..4dbaea668b3d160958b7f8a841bbf7e4de65d237 100644
--- a/third_party/WebKit/Source/platform/Timer.cpp
+++ b/third_party/WebKit/Source/platform/Timer.cpp
@@ -65,7 +65,7 @@
m_location = caller;
m_repeatInterval = repeatInterval;
- setNextFireTime(timerMonotonicallyIncreasingTime(), nextFireInterval);
+ setNextFireTime(monotonicallyIncreasingTime(), nextFireInterval);
}
void TimerBase::stop()
@@ -82,13 +82,13 @@
double TimerBase::nextFireInterval() const
{
ASSERT(isActive());
- double current = timerMonotonicallyIncreasingTime();
+ double current = monotonicallyIncreasingTime();
if (m_nextFireTime < current)
return 0;
return m_nextFireTime - current;
}
-WebTaskRunner* TimerBase::timerTaskRunner() const
+WebTaskRunner* TimerBase::timerTaskRunner()
{
return m_webTaskRunner;
}
@@ -121,13 +121,13 @@
TRACE_EVENT_SET_SAMPLING_STATE("blink", "BlinkInternal");
if (m_repeatInterval) {
- double now = timerMonotonicallyIncreasingTime();
+ double now = monotonicallyIncreasingTime();
// This computation should be drift free, and it will cope if we miss a beat,
// which can easily happen if the thread is busy. It will also cope if we get
// called slightly before m_unalignedNextFireTime, which can happen due to lack
// of timer precision.
double intervalToNextFireTime = m_repeatInterval - fmod(now - m_nextFireTime, m_repeatInterval);
- setNextFireTime(timerMonotonicallyIncreasingTime(), intervalToNextFireTime);
+ setNextFireTime(monotonicallyIncreasingTime(), intervalToNextFireTime);
} else {
m_nextFireTime = 0;
}
@@ -146,9 +146,4 @@
return Platform::current()->currentThread()->taskRunner();
}
-double TimerBase::timerMonotonicallyIncreasingTime() const
-{
- return timerTaskRunner()->monotonicallyIncreasingVirtualTimeSeconds();
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/Timer.h ('k') | third_party/WebKit/Source/platform/TimerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698