How similar are computer clocks?

If I made a program to play a video at a specific time and I put that program on multiple computers, when the time cames for all the videos to play, would they all be in sync?

The clocks would probably be in sync, if they're getting the time from the internet.

I think the difference would come from the time it takes each computer to load up the file.

3 Likes

In theory it would be in sync but they may be slightly out of sync depending on the medium the NTP packets are sent by and many other factors that could produce delay, NTP does adjust for delay but from my understanding it isn't 100% accurate but the difference is so small that you probably won't notice.

How in sync do you need them to be? My guess would be that your proposed solution would probably put the videos within a few seconds of sync. That might work for your purposes.

Keep in mind that you are not simply dealing with incorrect time between devices (although even that would probably drift around a second or so between machines). You will also have issues where different machines will take more or less time to start playback due to different storage mediums and other issues like that (different hardware decoders will take different amount of time to initialise and stuff like that).

If you need the videos to be more in sync there are protocols for properly syncing computers over a network. And then you could probably initialise the video playback on each machine before and "un-pause" the video at pretty much the same time on all machines. That should make it pretty syncronized. But you might still hear a slight echo if you are playing all machines in the same room at the same time.

You can go further with syncronization, but it depends on your needs.