summaryrefslogtreecommitdiffstats
path: root/base/time.h
diff options
context:
space:
mode:
authormmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-11 18:15:10 +0000
committermmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-11 18:15:10 +0000
commitdc9a22ac2628693842ee88a3eadae83c470f398d (patch)
treefdc2f6902640efaa80fe0cb355ca207873011527 /base/time.h
parent4b92c4260c6634b2b3e14960965c15fa45860148 (diff)
downloadchromium_src-dc9a22ac2628693842ee88a3eadae83c470f398d.zip
chromium_src-dc9a22ac2628693842ee88a3eadae83c470f398d.tar.gz
chromium_src-dc9a22ac2628693842ee88a3eadae83c470f398d.tar.bz2
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
Diffstat (limited to 'base/time.h')
-rw-r--r--base/time.h4
1 files changed, 4 insertions, 0 deletions
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 <time.h>
+
#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