From dc9a22ac2628693842ee88a3eadae83c470f398d Mon Sep 17 00:00:00 2001 From: "mmentovai@google.com" Date: Mon, 11 Aug 2008 18:15:10 +0000 Subject: Make POSIX time routines work on Linux by providing a POSIX-conformant version of TimeTicks::Now() to replace the Mach-specific one used on the Mac. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@664 0039d316-1c4b-4281-b951-d872f2087c98 --- base/time.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'base/time.h') diff --git a/base/time.h b/base/time.h index 306a67c..1a0d504 100644 --- a/base/time.h +++ b/base/time.h @@ -48,6 +48,7 @@ #define BASE_TIME_H_ #include + #include "base/basictypes.h" #include "testing/gtest/include/gtest/gtest_prod.h" @@ -196,6 +197,9 @@ class Time { static const int64 kMicrosecondsPerHour = kMicrosecondsPerMinute * 60; static const int64 kMicrosecondsPerDay = kMicrosecondsPerHour * 24; static const int64 kMicrosecondsPerWeek = kMicrosecondsPerDay * 7; + static const int64 kNanosecondsPerMicrosecond = 1000; + static const int64 kNanosecondsPerSecond = kNanosecondsPerMicrosecond * + kMicrosecondsPerSecond; // Represents an exploded time that can be formatted nicely. This is kind of // like the Win32 SYSTEMTIME structure or the Unix "struct tm" with a few -- cgit v1.1