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

Unified Diff: base/time/time.h

Issue 2951413003: Add UMA for High Resolution Timer Usage (Closed)
Patch Set: Added suspend / resume logic Created 3 years, 6 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 | base/time/time_win.cc » ('j') | base/time/time_win_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.h
diff --git a/base/time/time.h b/base/time/time.h
index 3ff215cbbc4132690bc11b41fe2aaec6b7306989..92430427b9c6e490e8b8905bde79553badb173a7 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -549,6 +549,15 @@ class BASE_EXPORT Time : public time_internal::TimeBase<Time> {
// This is provided for testing only, and is not tracked in a thread-safe
// way.
static bool IsHighResolutionTimerInUse();
+
+ // The following two functions are used to report the fraction of elapsed time
+ // that the high resolution timer is activated.
+ // ResetHighResolutionTimerUsage() resets the cumulative usage and starts the
+ // measurement interval and GetHighResolutionTimerUsage() returns the
+ // percentage of time since the reset that the high resolution timer was
+ // activated.
gab 2017/06/28 16:39:33 Also document that Get() is invalid before Reset()
stanisc 2017/06/28 22:28:35 Done.
+ static void ResetHighResolutionTimerUsage();
+ static double GetHighResolutionTimerUsage();
#endif
gab 2017/06/28 16:39:33 #endif // defined(OS_WIN) (this block is becomin
stanisc 2017/06/28 22:28:35 Done.
// Converts an exploded structure representing either the local time or UTC
« no previous file with comments | « no previous file | base/time/time_win.cc » ('j') | base/time/time_win_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698