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

Unified Diff: include/v8-platform.h

Issue 632663002: Add MonotonicallyIncreasingTime to V8 Platform. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « no previous file | src/libplatform/default-platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-platform.h
diff --git a/include/v8-platform.h b/include/v8-platform.h
index 1f1679f0e0b60ec7e36281e480cb20d8c8cad64b..7bac11aef069957fc7e22b0a437becdac44b8148 100644
--- a/include/v8-platform.h
+++ b/include/v8-platform.h
@@ -55,6 +55,20 @@ class Platform {
* scheduling. The definition of "foreground" is opaque to V8.
*/
virtual void CallOnForegroundThread(Isolate* isolate, Task* task) = 0;
+
+
+ /**
+ * Monotonically increasing time in seconds from an arbitrary fixed point in
+ * the past. This function is expected to return at least
+ * millisecond-precision values. For this reason,
+ * it is recommended that the fixed point be no further in the past than
+ * the epoch.
+ **/
+ virtual double MonotonicallyIncreasingTime() {
+ // TODO(rmcilroy): Remove this default implementation when Chromium
+ // change has landed.
+ return 0;
+ }
};
} // namespace v8
« no previous file with comments | « no previous file | src/libplatform/default-platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698