Given a timestamp string coming from another machine A to machine B (for example, hh:mm:ss.fff
) and assuming both machines' clocks to be synchronised, how can I make machine B calculate the timespan between its clock and the time in the string coming from machine A?
I've tried comparing with DateTime.Now.Ticks
, but the resolution seems to be 10-20 ms. I would like to calculate closer to a 1 ms resolution.
For some time now, I've had success in using Stopwatch.GetTimestamp()
for high-resolution timing, but keep in mind it's not that simple since I only have the string available in machine B, and no great way to calibrate Stopwatch.GetTimestamp
with an actual system time.