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

Unified Diff: third_party/WebKit/Source/core/dom/DOMHighResTimeStamp.h

Issue 1352523002: Use high precision timestamp for Event.timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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: third_party/WebKit/Source/core/dom/DOMHighResTimeStamp.h
diff --git a/third_party/WebKit/Source/core/dom/DOMHighResTimeStamp.h b/third_party/WebKit/Source/core/dom/DOMHighResTimeStamp.h
new file mode 100644
index 0000000000000000000000000000000000000000..d60ed0f2d5bd6ce63af1fa634e23c5d6e95d0db3
--- /dev/null
+++ b/third_party/WebKit/Source/core/dom/DOMHighResTimeStamp.h
@@ -0,0 +1,24 @@
+// Copyright 2015 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 DOMHighResTimeStamp_h
+#define DOMHighResTimeStamp_h
+
+namespace blink {
+
+typedef double DOMHighResTimeStamp;
+
+inline DOMHighResTimeStamp convertSecondsToDOMHighResTimeStamp(double seconds)
+{
+ return static_cast<DOMHighResTimeStamp>(seconds * 1000.0);
+}
+
+inline double convertDOMHighResTimeStampToSeconds(DOMHighResTimeStamp milliseconds)
+{
+ return milliseconds / 1000.0;
+}
+
+} // namespace blink
+
+#endif // DOMHighResTimeStamp_h

Powered by Google App Engine
This is Rietveld 408576698