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

Unified Diff: base/time/time.h

Issue 1008333002: Move time constants to base::Time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Time -> base::Time Created 5 years, 9 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 | chrome/browser/chromeos/policy/device_status_collector.cc » ('j') | no next file with comments »
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 b18c0b26d68c1bf8054b059278762fdc3491c62a..1824e89d9281954bce18313ca47b22267dab781c 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -233,6 +233,7 @@ BASE_EXPORT std::ostream& operator<<(std::ostream& os, TimeDelta time_delta);
// Represents a wall clock time in UTC.
class BASE_EXPORT Time {
public:
+ static const int64 kHoursPerDay = 24;
static const int64 kMillisecondsPerSecond = 1000;
static const int64 kMicrosecondsPerMillisecond = 1000;
static const int64 kMicrosecondsPerSecond = kMicrosecondsPerMillisecond *
@@ -241,6 +242,7 @@ class BASE_EXPORT Time {
static const int64 kMicrosecondsPerHour = kMicrosecondsPerMinute * 60;
static const int64 kMicrosecondsPerDay = kMicrosecondsPerHour * 24;
Lei Zhang 2015/03/16 21:11:49 Since you are adding |kHoursPerDay|, can you use t
qiankun 2015/03/17 03:20:35 Done.
static const int64 kMicrosecondsPerWeek = kMicrosecondsPerDay * 7;
+ static const int64 kMillisecondsPerDay = kMicrosecondsPerDay / 1000;
Lei Zhang 2015/03/16 21:11:49 Can you put this in order - just under |kMilliseco
qiankun 2015/03/17 03:20:35 Done.
static const int64 kNanosecondsPerMicrosecond = 1000;
static const int64 kNanosecondsPerSecond = kNanosecondsPerMicrosecond *
kMicrosecondsPerSecond;
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_status_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698