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

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

Issue 1952843002: Create TimeBase for time related classes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« src/base/bits.h ('K') | « src/base/platform/time.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 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 #include "src/base/platform/time.h" 5 #include "src/base/platform/time.h"
6 6
7 #if V8_OS_POSIX 7 #if V8_OS_POSIX
8 #include <fcntl.h> // for O_RDONLY 8 #include <fcntl.h> // for O_RDONLY
9 #include <sys/time.h> 9 #include <sys/time.h>
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 10 matching lines...) Expand all
21 #include "src/base/lazy-instance.h" 21 #include "src/base/lazy-instance.h"
22 #include "src/base/win32-headers.h" 22 #include "src/base/win32-headers.h"
23 #endif 23 #endif
24 #include "src/base/cpu.h" 24 #include "src/base/cpu.h"
25 #include "src/base/logging.h" 25 #include "src/base/logging.h"
26 #include "src/base/platform/platform.h" 26 #include "src/base/platform/platform.h"
27 27
28 namespace v8 { 28 namespace v8 {
29 namespace base { 29 namespace base {
30 30
31
31 TimeDelta TimeDelta::FromDays(int days) { 32 TimeDelta TimeDelta::FromDays(int days) {
32 return TimeDelta(days * Time::kMicrosecondsPerDay); 33 return TimeDelta(days * Time::kMicrosecondsPerDay);
33 } 34 }
34 35
35 36
36 TimeDelta TimeDelta::FromHours(int hours) { 37 TimeDelta TimeDelta::FromHours(int hours) {
37 return TimeDelta(hours * Time::kMicrosecondsPerHour); 38 return TimeDelta(hours * Time::kMicrosecondsPerHour);
38 } 39 }
39 40
40 41
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 556
556 // static 557 // static
557 bool TimeTicks::IsHighResolutionClockWorking() { 558 bool TimeTicks::IsHighResolutionClockWorking() {
558 return true; 559 return true;
559 } 560 }
560 561
561 #endif // V8_OS_WIN 562 #endif // V8_OS_WIN
562 563
563 } // namespace base 564 } // namespace base
564 } // namespace v8 565 } // namespace v8
OLDNEW
« src/base/bits.h ('K') | « src/base/platform/time.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698