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

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

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_NULL/NOT_NULL is back. Created 5 years, 10 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 | « src/base/platform/condition-variable.cc ('k') | src/base/platform/time.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project 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 #ifndef V8_BASE_PLATFORM_TIME_H_ 5 #ifndef V8_BASE_PLATFORM_TIME_H_
6 #define V8_BASE_PLATFORM_TIME_H_ 6 #define V8_BASE_PLATFORM_TIME_H_
7 7
8 #include <time.h> 8 #include <ctime>
9 #include <iosfwd>
9 #include <limits> 10 #include <limits>
10 11
11 #include "src/base/macros.h" 12 #include "src/base/macros.h"
12 13
13 // Forward declarations. 14 // Forward declarations.
14 extern "C" { 15 extern "C" {
15 struct _FILETIME; 16 struct _FILETIME;
16 struct mach_timespec; 17 struct mach_timespec;
17 struct timespec; 18 struct timespec;
18 struct timeval; 19 struct timeval;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return us_ >= other.us_; 274 return us_ >= other.us_;
274 } 275 }
275 276
276 private: 277 private:
277 explicit Time(int64_t us) : us_(us) {} 278 explicit Time(int64_t us) : us_(us) {}
278 279
279 // Time in microseconds in UTC. 280 // Time in microseconds in UTC.
280 int64_t us_; 281 int64_t us_;
281 }; 282 };
282 283
284 std::ostream& operator<<(std::ostream&, const Time&);
285
283 inline Time operator+(const TimeDelta& delta, const Time& time) { 286 inline Time operator+(const TimeDelta& delta, const Time& time) {
284 return time + delta; 287 return time + delta;
285 } 288 }
286 289
287 290
288 // ----------------------------------------------------------------------------- 291 // -----------------------------------------------------------------------------
289 // TimeTicks 292 // TimeTicks
290 // 293 //
291 // This class represents an abstract time that is most of the time incrementing 294 // This class represents an abstract time that is most of the time incrementing
292 // for use in measuring time durations. It is internally represented in 295 // for use in measuring time durations. It is internally represented in
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 int64_t ticks_; 394 int64_t ticks_;
392 }; 395 };
393 396
394 inline TimeTicks operator+(const TimeDelta& delta, const TimeTicks& ticks) { 397 inline TimeTicks operator+(const TimeDelta& delta, const TimeTicks& ticks) {
395 return ticks + delta; 398 return ticks + delta;
396 } 399 }
397 400
398 } } // namespace v8::base 401 } } // namespace v8::base
399 402
400 #endif // V8_BASE_PLATFORM_TIME_H_ 403 #endif // V8_BASE_PLATFORM_TIME_H_
OLDNEW
« no previous file with comments | « src/base/platform/condition-variable.cc ('k') | src/base/platform/time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698