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

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

Issue 358363002: Move platform abstraction to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 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 | Annotate | Revision Log
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_PLATFORM_TIME_H_ 5 #ifndef V8_BASE_PLATFORM_TIME_H_
6 #define V8_PLATFORM_TIME_H_ 6 #define V8_BASE_PLATFORM_TIME_H_
7 7
8 #include <time.h> 8 #include <time.h>
9 #include <limits> 9 #include <limits>
10 10
11 #include "src/base/macros.h" 11 #include "src/base/macros.h"
12 12
13 // Forward declarations. 13 // Forward declarations.
14 extern "C" { 14 extern "C" {
15 struct _FILETIME; 15 struct _FILETIME;
16 struct mach_timespec; 16 struct mach_timespec;
17 struct timespec; 17 struct timespec;
18 struct timeval; 18 struct timeval;
19 } 19 }
20 20
21 namespace v8 { 21 namespace v8 {
22 namespace internal { 22 namespace base {
23 23
24 class Time; 24 class Time;
25 class TimeTicks; 25 class TimeTicks;
26 26
27 // ----------------------------------------------------------------------------- 27 // -----------------------------------------------------------------------------
28 // TimeDelta 28 // TimeDelta
29 // 29 //
30 // This class represents a duration of time, internally represented in 30 // This class represents a duration of time, internally represented in
31 // microseonds. 31 // microseonds.
32 32
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 explicit TimeTicks(int64_t ticks) : ticks_(ticks) {} 381 explicit TimeTicks(int64_t ticks) : ticks_(ticks) {}
382 382
383 // Tick count in microseconds. 383 // Tick count in microseconds.
384 int64_t ticks_; 384 int64_t ticks_;
385 }; 385 };
386 386
387 inline TimeTicks operator+(const TimeDelta& delta, const TimeTicks& ticks) { 387 inline TimeTicks operator+(const TimeDelta& delta, const TimeTicks& ticks) {
388 return ticks + delta; 388 return ticks + delta;
389 } 389 }
390 390
391 } } // namespace v8::internal 391 } } // namespace v8::base
392 392
393 #endif // V8_PLATFORM_TIME_H_ 393 #endif // V8_BASE_PLATFORM_TIME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698