| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |