| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/time.h" | 5 #include "base/time/time.h" |
| 6 | 6 |
| 7 #include <CoreFoundation/CFDate.h> | 7 #include <CoreFoundation/CFDate.h> |
| 8 #include <CoreFoundation/CFTimeZone.h> | 8 #include <CoreFoundation/CFTimeZone.h> |
| 9 #include <mach/mach_time.h> | 9 #include <mach/mach_time.h> |
| 10 #include <sys/sysctl.h> | 10 #include <sys/sysctl.h> |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 TimeTicks TimeTicks::Now() { | 183 TimeTicks TimeTicks::Now() { |
| 184 return TimeTicks(ComputeCurrentTicks()); | 184 return TimeTicks(ComputeCurrentTicks()); |
| 185 } | 185 } |
| 186 | 186 |
| 187 // static | 187 // static |
| 188 TimeTicks TimeTicks::HighResNow() { | 188 TimeTicks TimeTicks::HighResNow() { |
| 189 return Now(); | 189 return Now(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 // static | 192 // static |
| 193 bool TimeTicks::IsHighResNowFastAndReliable() { |
| 194 return true; |
| 195 } |
| 196 |
| 197 // static |
| 193 TimeTicks TimeTicks::ThreadNow() { | 198 TimeTicks TimeTicks::ThreadNow() { |
| 194 NOTREACHED(); | 199 NOTREACHED(); |
| 195 return TimeTicks(); | 200 return TimeTicks(); |
| 196 } | 201 } |
| 197 | 202 |
| 198 // static | 203 // static |
| 199 TimeTicks TimeTicks::NowFromSystemTraceTime() { | 204 TimeTicks TimeTicks::NowFromSystemTraceTime() { |
| 200 return HighResNow(); | 205 return HighResNow(); |
| 201 } | 206 } |
| 202 | 207 |
| 203 } // namespace base | 208 } // namespace base |
| OLD | NEW |