Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // C++ iostream operators for logging base::Time, base::TimeDelta and | |
| 6 // base::TimeTicks objects. For use with DCHECK_EQ(), DCHECK_LE(), etc. This | |
| 7 // file is separated from time.h to avoid the iostream dependency, and also | |
| 8 // because these operators should only be used for logging. | |
| 9 // | |
| 10 // Never use these methods to format user-visible strings. See | |
| 11 // "base/i18n/time_formatting.h" instead. | |
|
mmenke
2014/10/21 14:20:09
Optional: I think it's more common to put file-le
Adam Rice
2014/10/23 01:13:02
True. I merged the functionality into time.h anywa
| |
| 12 | |
| 13 #ifndef BASE_TIME_TIME_LOGGING_H_ | |
| 14 #define BASE_TIME_TIME_LOGGING_H_ | |
| 15 | |
| 16 #include <iosfwd> | |
| 17 | |
| 18 #include "base/base_export.h" | |
| 19 | |
| 20 namespace base { | |
| 21 | |
| 22 class Time; | |
| 23 class TimeDelta; | |
| 24 class TimeTicks; | |
| 25 | |
| 26 BASE_EXPORT std::ostream& operator<<(std::ostream& os, | |
| 27 const TimeDelta& time_delta); | |
| 28 BASE_EXPORT std::ostream& operator<<(std::ostream& os, const Time& time); | |
| 29 BASE_EXPORT std::ostream& operator<<(std::ostream& os, | |
| 30 const TimeTicks& time_ticks); | |
| 31 | |
| 32 } // namespace base | |
| 33 | |
| 34 #endif // BASE_TIME_TIME_LOGGING_H_ | |
| OLD | NEW |