| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium 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 "base/time.h" | 5 #include "base/time.h" |
| 6 | 6 |
| 7 #ifdef OS_MACOSX | 7 #ifdef OS_MACOSX |
| 8 #include <mach/mach_time.h> | 8 #include <mach/mach_time.h> |
| 9 #endif | 9 #endif |
| 10 #include <sys/time.h> | 10 #include <sys/time.h> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 (static_cast<int64>(ts.tv_nsec) / Time::kNanosecondsPerMicrosecond); | 130 (static_cast<int64>(ts.tv_nsec) / Time::kNanosecondsPerMicrosecond); |
| 131 | 131 |
| 132 #else // _POSIX_MONOTONIC_CLOCK | 132 #else // _POSIX_MONOTONIC_CLOCK |
| 133 #error No usable tick clock function on this platform. | 133 #error No usable tick clock function on this platform. |
| 134 #endif // _POSIX_MONOTONIC_CLOCK | 134 #endif // _POSIX_MONOTONIC_CLOCK |
| 135 | 135 |
| 136 return TimeTicks(absolute_micro); | 136 return TimeTicks(absolute_micro); |
| 137 } | 137 } |
| 138 | 138 |
| 139 // static | 139 // static |
| 140 TimeTicks TimeTicks::UnreliableHighResNow() { | 140 TimeTicks TimeTicks::HighResNow() { |
| 141 return Now(); | 141 return Now(); |
| 142 } | 142 } |
| OLD | NEW |