Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Milliseconds



Thanks David

A dumb question-- are UpTime or mach_absolute_time smart enough to do the right thing if the cpu does processor throttling for power savings? Would the time rate stay constant (especially curious about x86 platform) if the CPU clock is arbitrarily changing speed?

Thanks

JCJR

----- Original Message ----- From: "David Duncan" <email@hidden>
To: "Carbon Development" <email@hidden>
Sent: Monday, January 15, 2007 3:32 PM
Subject: Re: Milliseconds



On Jan 15, 2007, at 12:25 PM, James W. Walker wrote:

The reference docs for CFAbsoluteTimeGetCurrent say "Repeated calls to this function do not guarantee monotonically increasing results. The system time may decrease due to synchronization with external time references or due to an explicit user change of the clock.". Does that apply to UpTime and mach_absolute_time too? There are no reference docs for UpTime or mach_absolute_time as far as I can tell.

UpTime and mach_absolute_time are monotonically increasing clocks. CFAbsoluteTimeGetCurrent tracks wall time and returns units since Midnight Jan 1 2001 GMT. If your clock changes, UpTime and mach_absolute_time are unaffected, while CFAbsoluteTimeGetCurrent might skip forward suddenly or jump back, depending on the change in your clock.
--
David Duncan
Apple DTS Quartz and Printing
email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Milliseconds (From: George Warner <email@hidden>)
 >Re: Milliseconds (From: "James W. Walker" <email@hidden>)
 >Re: Milliseconds (From: David Duncan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.