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

Side by Side Diff: base/time/time.h

Issue 665023002: Post-commit fixes for "stale-while-revalidate..." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make DCHECK_EQ work for TimeDelta objects. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Time represents an absolute point in coordinated universal time (UTC), 5 // Time represents an absolute point in coordinated universal time (UTC),
6 // internally represented as microseconds (s/1,000,000) since the Windows epoch 6 // internally represented as microseconds (s/1,000,000) since the Windows epoch
7 // (1601-01-01 00:00:00 UTC) (See http://crbug.com/14734). System-dependent 7 // (1601-01-01 00:00:00 UTC) (See http://crbug.com/14734). System-dependent
8 // clock interface routines are defined in time_PLATFORM.cc. 8 // clock interface routines are defined in time_PLATFORM.cc.
9 // 9 //
10 // TimeDelta represents a duration of time, internally represented in 10 // TimeDelta represents a duration of time, internally represented in
11 // microseconds. 11 // microseconds.
12 // 12 //
13 // TimeTicks represents an abstract time that is most of the time incrementing 13 // TimeTicks represents an abstract time that is most of the time incrementing
14 // for use in measuring time durations. It is internally represented in 14 // for use in measuring time durations. It is internally represented in
15 // microseconds. It can not be converted to a human-readable time, but is 15 // microseconds. It can not be converted to a human-readable time, but is
16 // guaranteed not to decrease (if the user changes the computer clock, 16 // guaranteed not to decrease (if the user changes the computer clock,
17 // Time::Now() may actually decrease or jump). But note that TimeTicks may 17 // Time::Now() may actually decrease or jump). But note that TimeTicks may
18 // "stand still", for example if the computer suspended. 18 // "stand still", for example if the computer suspended.
19 // 19 //
20 // These classes are represented as only a 64-bit value, so they can be 20 // These classes are represented as only a 64-bit value, so they can be
21 // efficiently passed by value. 21 // efficiently passed by value.
22 //
23 // To make these types work with DCHECK_EQ() and other log macros, include
24 // "base/time/time_logging.h". For human-readable formatting, see
25 // "base/i18n/time_formatting.h".
22 26
23 #ifndef BASE_TIME_TIME_H_ 27 #ifndef BASE_TIME_TIME_H_
24 #define BASE_TIME_TIME_H_ 28 #define BASE_TIME_TIME_H_
25 29
26 #include <time.h> 30 #include <time.h>
27 31
28 #include "base/base_export.h" 32 #include "base/base_export.h"
29 #include "base/basictypes.h" 33 #include "base/basictypes.h"
30 #include "build/build_config.h" 34 #include "build/build_config.h"
31 35
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 #endif 723 #endif
720 }; 724 };
721 725
722 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 726 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
723 return TimeTicks(t.ticks_ + delta_); 727 return TimeTicks(t.ticks_ + delta_);
724 } 728 }
725 729
726 } // namespace base 730 } // namespace base
727 731
728 #endif // BASE_TIME_TIME_H_ 732 #endif // BASE_TIME_TIME_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/time/time_logging.h » ('j') | base/time/time_logging.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698