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

Unified Diff: src/libplatform/default-platform.cc

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 | « src/libplatform/default-platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libplatform/default-platform.cc
diff --git a/src/libplatform/default-platform.cc b/src/libplatform/default-platform.cc
index b5b8571dbc9a9e4d059d91bb641bf5a6ff81f858..1ac52f919f3f4889037512e332a5b07fba25146c 100644
--- a/src/libplatform/default-platform.cc
+++ b/src/libplatform/default-platform.cc
@@ -9,6 +9,7 @@
#include "src/base/logging.h"
#include "src/base/platform/platform.h"
+#include "src/base/platform/time.h"
#include "src/base/sys-info.h"
#include "src/libplatform/worker-thread.h"
@@ -106,4 +107,9 @@ void DefaultPlatform::CallOnForegroundThread(v8::Isolate* isolate, Task* task) {
main_thread_queue_[isolate].push(task);
}
+
+double DefaultPlatform::MonotonicallyIncreasingTime() {
+ return base::TimeTicks::HighResolutionNow().ToInternalValue() /
+ static_cast<double>(base::Time::kMicrosecondsPerSecond);
+}
} } // namespace v8::platform
« no previous file with comments | « src/libplatform/default-platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698