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

Unified Diff: base/task_scheduler/task.cc

Issue 1906813003: TaskScheduler: TimeDelta instead of TimeTicks in Task's constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sched_2c_owned_delegate
Patch Set: rebase Created 4 years, 8 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 | « base/task_scheduler/task.h ('k') | base/task_scheduler/task_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task.cc
diff --git a/base/task_scheduler/task.cc b/base/task_scheduler/task.cc
index e738bed20bccaa385efb7515d8ef6172a991b12d..8a589a202186dc2b3404c234e104a856ca57d8dd 100644
--- a/base/task_scheduler/task.cc
+++ b/base/task_scheduler/task.cc
@@ -10,10 +10,10 @@ namespace internal {
Task::Task(const tracked_objects::Location& posted_from,
const Closure& task,
const TaskTraits& traits,
- const TimeTicks& delayed_run_time)
+ const TimeDelta& delay)
: PendingTask(posted_from,
task,
- delayed_run_time,
+ delay.is_zero() ? TimeTicks() : TimeTicks::Now() + delay,
false), // Not nestable.
traits(traits) {}
« no previous file with comments | « base/task_scheduler/task.h ('k') | base/task_scheduler/task_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698