Need to get the Timestamp value from system time with high resolution (microseconds). I googled and found that we should use StopWatch. But stopwatch is used for difference between of two different time, is it correct?
Asked
Active
Viewed 932 times
0
-
You can't get what isn't there. Any microsecond value you get out of `.Now` is completely arbitrary. If you want precision, use Stopwatch. It's *NOT* used only for differences, it uses a high performance counter – Panagiotis Kanavos Jun 01 '17 at 10:04
-
Can you construct something from the fact that 1 milli second is 1000 micro seconds? You can get milliseconds from the DateTime – Wheels73 Jun 01 '17 at 10:07
-
@ Panagiotis Kanavos, How to calculate Microseconds using Stopwatch ? long microseconds = sw.ElapsedTicks / (Stopwatch.Frequency / (1000L*1000L)); is it Correct? – user1645200 Jun 05 '17 at 06:48