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

Side by Side Diff: base/time/time_mac.cc

Issue 797893003: [Windows] One TimeTicks clock: efficient/reliable high-res, with low-res fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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
OLDNEW
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.h> 9 #include <mach/mach.h>
10 #include <mach/mach_time.h> 10 #include <mach/mach_time.h>
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 // TimeTicks ------------------------------------------------------------------ 214 // TimeTicks ------------------------------------------------------------------
215 215
216 // static 216 // static
217 TimeTicks TimeTicks::Now() { 217 TimeTicks TimeTicks::Now() {
218 return TimeTicks(ComputeCurrentTicks()); 218 return TimeTicks(ComputeCurrentTicks());
219 } 219 }
220 220
221 // static 221 // static
222 TimeTicks TimeTicks::HighResNow() { 222 bool TimeTicks::IsHighResolution() {
223 return Now();
224 }
225
226 // static
227 bool TimeTicks::IsHighResNowFastAndReliable() {
228 return true; 223 return true;
229 } 224 }
230 225
231 // static 226 // static
232 TimeTicks TimeTicks::ThreadNow() { 227 TimeTicks TimeTicks::ThreadNow() {
233 return TimeTicks(ComputeThreadTicks()); 228 return TimeTicks(ComputeThreadTicks());
234 } 229 }
235 230
236 // static 231 // static
237 TimeTicks TimeTicks::NowFromSystemTraceTime() { 232 TimeTicks TimeTicks::NowFromSystemTraceTime() {
238 return HighResNow(); 233 return HighResNow();
239 } 234 }
240 235
241 } // namespace base 236 } // namespace base
OLDNEW
« no previous file with comments | « base/time/time.h ('k') | base/time/time_posix.cc » ('j') | base/time/time_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698