Casebash
Casebash

Reputation: 118812

How to accurately sync time between iPhones?

I am writing an application that will require me to sync the time on a large number of iPhones accurately (to within a fraction of a second). As far as I can tell, access to the time function of the GPS is not available. If I sync over the Internet, then the biggest problem is network latency. The delay before the answer to a request is received can be estimated to be half the round trip - but how accurate can I expect this to be? Would it be worthwhile sending multiple requests and averaging or is there another better way of synchronising time?

Upvotes: 8

Views: 1148

Answers (1)

David
David

Reputation: 3113

Try implementing Marzullo's algorithm, as notably used in NTP.

Upvotes: 4

Related Questions