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

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

Issue 2876513002: Use WTF::TimeDelta to specify delays on WebTaskRunner (Closed)
Patch Set: mac fix Created 3 years, 7 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
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 5f543f0ff20b03ce8cc185ce618eac90807408cd..a1612d500de21ccf86b297c9e4f369a425b85fbd 100644
--- a/third_party/WebKit/Source/platform/Timer.cpp
+++ b/third_party/WebKit/Source/platform/Timer.cpp
@@ -137,11 +137,10 @@ void TimerBase::SetNextFireTime(double now, double delay) {
// Cancel any previously posted task.
weak_ptr_factory_.RevokeAll();
- double delay_ms = 1000.0 * delay;
- TimerTaskRunner()->PostDelayedTask(
+ TimerTaskRunner()->ToSingleThreadTaskRunner()->PostDelayedTask(
location_,
base::Bind(&TimerBase::RunInternal, weak_ptr_factory_.CreateWeakPtr()),
- delay_ms);
+ TimeDelta::FromSecondsD(delay));
}
}
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerThread.cpp ('k') | third_party/WebKit/Source/platform/WebTaskRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698