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

Unified Diff: runtime/vm/os.h

Issue 1960483002: Include thread CPU time in Timeline (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | runtime/vm/os_android.cc » ('j') | runtime/vm/os_macos.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os.h
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index cd570c4bcabe650095a21cc7455d064f5dc8f6d5..906432240bbf79dc7d38945796ff55f9e615c2be 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -56,6 +56,13 @@ class OS {
// Returns the frequency of the monotonic clock.
static int64_t GetCurrentMonotonicFrequency();
+ // Returns the value of current thread's CPU usage clock in microseconds.
+ // NOTE: This clock will return different values depending on the calling
+ // thread. It is only expected to increase in value as the thread uses
+ // CPU time.
+ // NOTE: This function will return -1 on OSs that are not supported.
+ static int64_t GetCurrentThreadCPUMicros();
+
// Returns a cleared aligned array of type T with n entries.
// Alignment must be >= 16 and a power of two.
template<typename T>
« no previous file with comments | « no previous file | runtime/vm/os_android.cc » ('j') | runtime/vm/os_macos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698