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

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

Issue 2363023002: Clean up my TODO comments in SmallMap and Time. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « base/containers/small_map.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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). System-dependent clock interface routines are 7 // (1601-01-01 00:00:00 UTC). System-dependent clock interface routines are
8 // defined in time_PLATFORM.cc. Note that values for Time may skew and jump 8 // defined in time_PLATFORM.cc. Note that values for Time may skew and jump
9 // around as the operating system makes adjustments to synchronize (e.g., with 9 // around as the operating system makes adjustments to synchronize (e.g., with
10 // NTP servers). Thus, client code that uses the Time class must account for 10 // NTP servers). Thus, client code that uses the Time class must account for
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 // times are increasing, or that two calls to Now() won't be the same. 450 // times are increasing, or that two calls to Now() won't be the same.
451 static Time Now(); 451 static Time Now();
452 452
453 // Returns the current time. Same as Now() except that this function always 453 // Returns the current time. Same as Now() except that this function always
454 // uses system time so that there are no discrepancies between the returned 454 // uses system time so that there are no discrepancies between the returned
455 // time and system time even on virtual environments including our test bot. 455 // time and system time even on virtual environments including our test bot.
456 // For timing sensitive unittests, this function should be used. 456 // For timing sensitive unittests, this function should be used.
457 static Time NowFromSystemTime(); 457 static Time NowFromSystemTime();
458 458
459 // Converts to/from time_t in UTC and a Time class. 459 // Converts to/from time_t in UTC and a Time class.
460 // TODO(brettw) this should be removed once everybody starts using the |Time|
461 // class.
462 static Time FromTimeT(time_t tt); 460 static Time FromTimeT(time_t tt);
463 time_t ToTimeT() const; 461 time_t ToTimeT() const;
464 462
465 // Converts time to/from a double which is the number of seconds since epoch 463 // Converts time to/from a double which is the number of seconds since epoch
466 // (Jan 1, 1970). Webkit uses this format to represent time. 464 // (Jan 1, 1970). Webkit uses this format to represent time.
467 // Because WebKit initializes double time value to 0 to indicate "not 465 // Because WebKit initializes double time value to 0 to indicate "not
468 // initialized", we map it to empty Time object that also means "not 466 // initialized", we map it to empty Time object that also means "not
469 // initialized". 467 // initialized".
470 static Time FromDoubleT(double dt); 468 static Time FromDoubleT(double dt);
471 double ToDoubleT() const; 469 double ToDoubleT() const;
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 static void WaitUntilInitializedWin(); 833 static void WaitUntilInitializedWin();
836 #endif 834 #endif
837 }; 835 };
838 836
839 // For logging use only. 837 // For logging use only.
840 BASE_EXPORT std::ostream& operator<<(std::ostream& os, ThreadTicks time_ticks); 838 BASE_EXPORT std::ostream& operator<<(std::ostream& os, ThreadTicks time_ticks);
841 839
842 } // namespace base 840 } // namespace base
843 841
844 #endif // BASE_TIME_TIME_H_ 842 #endif // BASE_TIME_TIME_H_
OLDNEW
« no previous file with comments | « base/containers/small_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698