Re: What is HostTime?
Re: What is HostTime?
- Subject: Re: What is HostTime?
- From: Jeff Moore <email@hidden>
- Date: Thu, 30 Jan 2003 12:41:10 -0800
"Host Time" is what we call the clock that is based on the time base
registers on the PowerPC chip. This clock is driven by the system bus
clock, so the frequency varies from machine to machine. In classic Mac
OS, you used the UpTime() call in DriverServices.h to access the clock.
On Mac OS X, in addition to UpTime(), you can use the routines in
<CoreAudio/HostTime.h> or the routines in <mach/mach_time.h> to access
the clock. The clock gets zeroed during boot, but is otherwise
monotonically increasing.
Host Time allows for different parts of the system to communicate in a
common time base to facilitate synchronization. The key thing to
remember about Host Time is that it is the differences between time
stamps that is important, not the absolute value. This is how you tell
how far apart the events are so that you can maintain it when playing
it back later.
On Thursday, January 30, 2003, at 04:00 AM, Vigour Vigour wrote:
Hi!
I wonder what HostTime really is? Is it a timer that starts ticking as
soon I turn on my Mac and never stop? And a timer that can never be
reset to zero?
Let us say that I record a sequence of midi bytes. What do I need to
do with the timestamp to be able to play them back later? I mean, the
timestamp that comes in is too old to be usefull in the future so some
kind of calculating (adding) is needed.
Best regards Peter
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.