| OLD | NEW |
| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 // month is set to 31 on a 28-30 day month. | 548 // month is set to 31 on a 28-30 day month. |
| 549 static bool FromUTCExploded(const Exploded& exploded, | 549 static bool FromUTCExploded(const Exploded& exploded, |
| 550 Time* time) WARN_UNUSED_RESULT { | 550 Time* time) WARN_UNUSED_RESULT { |
| 551 return FromExploded(false, exploded, time); | 551 return FromExploded(false, exploded, time); |
| 552 } | 552 } |
| 553 static bool FromLocalExploded(const Exploded& exploded, | 553 static bool FromLocalExploded(const Exploded& exploded, |
| 554 Time* time) WARN_UNUSED_RESULT { | 554 Time* time) WARN_UNUSED_RESULT { |
| 555 return FromExploded(true, exploded, time); | 555 return FromExploded(true, exploded, time); |
| 556 } | 556 } |
| 557 | 557 |
| 558 static Time GetMaxPlatformTime() { return Time(); } |
| 559 |
| 558 // Converts a string representation of time to a Time object. | 560 // Converts a string representation of time to a Time object. |
| 559 // An example of a time string which is converted is as below:- | 561 // An example of a time string which is converted is as below:- |
| 560 // "Tue, 15 Nov 1994 12:45:26 GMT". If the timezone is not specified | 562 // "Tue, 15 Nov 1994 12:45:26 GMT". If the timezone is not specified |
| 561 // in the input string, FromString assumes local time and FromUTCString | 563 // in the input string, FromString assumes local time and FromUTCString |
| 562 // assumes UTC. A timezone that cannot be parsed (e.g. "UTC" which is not | 564 // assumes UTC. A timezone that cannot be parsed (e.g. "UTC" which is not |
| 563 // specified in RFC822) is treated as if the timezone is not specified. | 565 // specified in RFC822) is treated as if the timezone is not specified. |
| 564 // TODO(iyengar) Move the FromString/FromTimeT/ToTimeT/FromFileTime to | 566 // TODO(iyengar) Move the FromString/FromTimeT/ToTimeT/FromFileTime to |
| 565 // a new time converter class. | 567 // a new time converter class. |
| 566 static bool FromString(const char* time_string, Time* parsed_time) { | 568 static bool FromString(const char* time_string, Time* parsed_time) { |
| 567 return FromStringInternal(time_string, true, parsed_time); | 569 return FromStringInternal(time_string, true, parsed_time); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 static void WaitUntilInitializedWin(); | 844 static void WaitUntilInitializedWin(); |
| 843 #endif | 845 #endif |
| 844 }; | 846 }; |
| 845 | 847 |
| 846 // For logging use only. | 848 // For logging use only. |
| 847 BASE_EXPORT std::ostream& operator<<(std::ostream& os, ThreadTicks time_ticks); | 849 BASE_EXPORT std::ostream& operator<<(std::ostream& os, ThreadTicks time_ticks); |
| 848 | 850 |
| 849 } // namespace base | 851 } // namespace base |
| 850 | 852 |
| 851 #endif // BASE_TIME_TIME_H_ | 853 #endif // BASE_TIME_TIME_H_ |
| OLD | NEW |