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

Unified Diff: components/scheduler/child/virtual_time_tqm_delegate.cc

Issue 1411843008: Make blink platform time consistent with the timer virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: components/scheduler/child/virtual_time_tqm_delegate.cc
diff --git a/components/scheduler/child/virtual_time_tqm_delegate.cc b/components/scheduler/child/virtual_time_tqm_delegate.cc
index 2d7399ffce5cb46153004c55508d9a72a27bf90f..6f81fd06b3eb3de00c6c300b0d001c64e1f9f405 100644
--- a/components/scheduler/child/virtual_time_tqm_delegate.cc
+++ b/components/scheduler/child/virtual_time_tqm_delegate.cc
@@ -65,6 +65,10 @@ base::TimeTicks VirtualTimeTqmDelegate::NowTicks() {
return now_;
}
+double VirtualTimeTqmDelegate::currentTime() const {
+ return (now_ - base::TimeTicks::UnixEpoch()).InSecondsF();
+}
+
void VirtualTimeTqmDelegate::AdvancedTimeTo(base::TimeTicks now) {
now_ = now;
DCHECK_GE(now, now_);

Powered by Google App Engine
This is Rietveld 408576698