NSTimeInterval from hosttime (synching multiple computers)
NSTimeInterval from hosttime (synching multiple computers)
- Subject: NSTimeInterval from hosttime (synching multiple computers)
- From: Mark's Studio <email@hidden>
- Date: Tue, 4 Mar 2008 12:49:32 +0100
I might be off in the wrong direction, but i found out that the
[NSDate timeIntervalSinceReferenceData]
returned on different computers looks like to be in sync, when "Set
date & time automatically" is checked in system preferences.
Does anyone know how precise this is ?
I found this code to convert the hosttime to NSTimeinterval,
Float64 freq = AudioGetHostClockFrequency();
NSTimeInterval timeStamp = ((double) inTimeStamp->mHostTime) / freq;
but that gives me the time since startup (if that's where the hosttime
is started),
what would be the best way to get it relative to
timeIntervalSinceReferenceData ?
PS I am using this for sending audio/video over network and need some
sort of common clock to sync to.
Peter Mark
Mark's Recording Studio A/S
Lundeskovsvej 3
2900 Hellerup
Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden