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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/time_converter.h

Issue 2749383003: WorkerThread CPU Load UMA (Closed)
Patch Set: build fix Created 3 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
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_

Powered by Google App Engine
This is Rietveld 408576698