Index: third_party/WebKit/Source/platform/scheduler/base/time_converter.h |
diff --git a/third_party/WebKit/Source/platform/scheduler/base/time_converter.h b/third_party/WebKit/Source/platform/scheduler/base/time_converter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c4f75f877a68111ca3eb276ea792d2a42d588f65 |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_converter.h |
@@ -0,0 +1,24 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_CONVERTER_H_ |
+#define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_CONVERTER_H_ |
+ |
+#include "base/time/time.h" |
+ |
+namespace blink { |
+namespace scheduler { |
+ |
+// TODO(scheduler-dev): Remove conversions when Blink starts using |
+// base::TimeTicks instead of doubles for time. |
+static inline base::TimeTicks MonotonicTimeInSecondsToTimeTicks( |
+ double monotonicTimeInSeconds) { |
+ return base::TimeTicks() + |
+ base::TimeDelta::FromSecondsD(monotonicTimeInSeconds); |
+} |
+ |
+} // namespace scheduler |
+} // namespace blink |
+ |
+#endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TIME_CONVERTER_H_ |