summaryrefslogtreecommitdiffstats
path: root/base/time.h
diff options
context:
space:
mode:
authorbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-03 07:22:52 +0000
committerbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-03 07:22:52 +0000
commit61106397691808e24d086fd5b61122da10576200 (patch)
tree86894d86d11afa390e10f6bb8564cac2fff74214 /base/time.h
parentf06d5e2c77b117ac230a0d8b3395d2bd35ef9d5d (diff)
downloadchromium_src-61106397691808e24d086fd5b61122da10576200.zip
chromium_src-61106397691808e24d086fd5b61122da10576200.tar.gz
chromium_src-61106397691808e24d086fd5b61122da10576200.tar.bz2
Add native QPC to base::Time* conversion on Windows.
BUG=137792 Review URL: https://chromiumcodereview.appspot.com/10843038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time.h')
-rw-r--r--base/time.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/time.h b/base/time.h
index 97010cb..389887a 100644
--- a/base/time.h
+++ b/base/time.h
@@ -64,6 +64,9 @@ class BASE_EXPORT TimeDelta {
static TimeDelta FromSeconds(int64 secs);
static TimeDelta FromMilliseconds(int64 ms);
static TimeDelta FromMicroseconds(int64 us);
+#if defined(OS_WIN)
+ static TimeDelta FromQPCValue(LONGLONG qpc_value);
+#endif
// Converts an integer value representing TimeDelta to a class. This is used
// when deserializing a |TimeDelta| structure, using a value known to be
@@ -510,6 +513,8 @@ class BASE_EXPORT TimeTicks {
// Get the absolute value of QPC time drift. For testing.
static int64 GetQPCDriftMicroseconds();
+ static TimeTicks FromQPCValue(LONGLONG qpc_value);
+
// Returns true if the high resolution clock is working on this system.
// This is only for testing.
static bool IsHighResClockWorking();