Index: third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.cc |
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.cc b/third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.cc |
index f7a7205e87f285684b74ff7a33938c363c057463..7c0aa574e41a9b3d1d3d297387add1f8626928a6 100644 |
--- a/third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.cc |
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.cc |
@@ -25,8 +25,15 @@ void ThrottledTimeDomain::CancelWakeUpAt(base::TimeTicks run_time) { |
// We ignore this because RequestWakeUpAt is a NOP. |
} |
+void ThrottledTimeDomain::SetNextTaskRunTime(base::TimeTicks run_time) { |
+ next_task_run_time_ = run_time; |
+} |
+ |
base::Optional<base::TimeDelta> ThrottledTimeDomain::DelayTillNextTask( |
LazyNow* lazy_now) { |
+ if (next_task_run_time_ && next_task_run_time_ > lazy_now->Now()) |
+ return next_task_run_time_.value() - lazy_now->Now(); |
+ |
base::TimeTicks next_run_time; |
if (!NextScheduledRunTime(&next_run_time)) |
return base::nullopt; |