Periodically update the time delta and calculate mean over a range so you stay in sync with their clock.
Took out quick and dirty test code.