I want to compute some latencies in my server-client application. I was thinking about measuring the time when I send a package from client A
, then the time when it arrives on the server
, and a third time when it arrives the client B
. I was thinking about using DateTime.UtcNow
, but then realized that it takes the system time, which will surely differ on all three machines. Since my measurement will be couple thousand nanoseconds only, surely less than 10ms, since all machines are in a network.
Is there a way to have exact time on all three machines? Possibly without using a external server, where I have to use HTTP requests.