• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTimeInterval from hosttime (synching multiple computers)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: XCode AU Template / Window Error in Logic
  • Next by Date: Is a CoreAudio bug the cause of the annoying "overload" messages in Logic 8 ?
  • Previous by thread: Re: XCode AU Template / Window Error in Logic
  • Next by thread: Re: Coreaudio-api Digest, Vol 5, Issue 76
  • Index(es):
    • Date
    • Thread