zipkin4net
zipkin4net copied to clipboard
Please use System.Diagnostics.Stopwatch.GetTimestamp() for high resolution time
In some static constructor keep up with the following:
StartDateTime = DateTime.UtcNow;
StartTicks = System.Diagnostics.Stopwatch.GetTimestamp();
Then you can calculate the current high precision time using:
startDateTime.AddTicks(System.Diagnostics.Stopwatch.GetTimestamp() - startTicks)
Thanks.
Then you can check the following to make sure it's high precision time:
Console.WriteLine(System.Diagnostics.Stopwatch.IsHighResolution);
Console.WriteLine(System.Diagnostics.Stopwatch.Frequency);