By the value of msdn DateTime, the accuracy is 10 ms. The accuracy of t2-t1 in the example below is also 10 ms. However, the return value is "double", which is confusing.
DateTime t1 = DateTime.Now; // precision is 10 ms .... DateTime t2 = DateTime.Now; // precision is 10 ms ... (t2-t1).TotalMilliseconds; // double (so precision is less than 1 ms???)
I expect an int value because a double value does not make sense when the accuracy is 10 ms. I need to use the given value in Thread.Sleep (). Should I just use int?
source share