How to synchronize time between two different process?

1.3k Views Asked by At

I want to send some frames between two process running inside two different linux machine. I want to know how many frames received per second. So from process1 on machine1, I time stamped the frame and then process2 on machine2 receives it. It will check the time stamp and calculate the how long it takes to arrive the process2.

But the time on this two machines are not exactly the same, maybe there is 1 second different, then how to get the time the frames take to arrive the process2 on machine2?

1

There are 1 best solutions below

0
On

You have a number of options depending what sort of precision you want to get in your results. You could

  1. use NTP on both machines
  2. measure average RTT / 2
  3. check known algorithms for clock synchronization and see if any of them suits your need.