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

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

Issue 2090783002: Limit InterProcessTimeTicksConverter to platforms that require it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comment fix Created 4 years, 5 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
« no previous file with comments | « base/time/time.h ('k') | base/time/time_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 TimeTicks TimeTicks::Now() { 252 TimeTicks TimeTicks::Now() {
253 return TimeTicks(ComputeCurrentTicks()); 253 return TimeTicks(ComputeCurrentTicks());
254 } 254 }
255 255
256 // static 256 // static
257 bool TimeTicks::IsHighResolution() { 257 bool TimeTicks::IsHighResolution() {
258 return true; 258 return true;
259 } 259 }
260 260
261 // static 261 // static
262 bool TimeTicks::IsConsistentAcrossProcesses() {
263 return true;
264 }
265
266 // static
262 TimeTicks::Clock TimeTicks::GetClock() { 267 TimeTicks::Clock TimeTicks::GetClock() {
263 #if defined(OS_IOS) 268 #if defined(OS_IOS)
264 return Clock::IOS_CF_ABSOLUTE_TIME_MINUS_KERN_BOOTTIME; 269 return Clock::IOS_CF_ABSOLUTE_TIME_MINUS_KERN_BOOTTIME;
265 #else 270 #else
266 return Clock::MAC_MACH_ABSOLUTE_TIME; 271 return Clock::MAC_MACH_ABSOLUTE_TIME;
267 #endif // defined(OS_IOS) 272 #endif // defined(OS_IOS)
268 } 273 }
269 274
270 // static 275 // static
271 ThreadTicks ThreadTicks::Now() { 276 ThreadTicks ThreadTicks::Now() {
272 return ThreadTicks(ComputeThreadTicks()); 277 return ThreadTicks(ComputeThreadTicks());
273 } 278 }
274 279
275 } // namespace base 280 } // namespace base
OLDNEW
« no previous file with comments | « base/time/time.h ('k') | base/time/time_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698