rspec/rules/S6561/why-dotnet.adoc

5 lines
450 B
Plaintext

== Why is this an issue?
Using `DateTime.Now` calls within a subtraction operation to measure elapsed time is not recommended.
This property is subject to changes such as daylight savings transitions, which can invalidate the calculation if the change occurs during the benchmark session, or when updating a timer.
Moreover, `DateTime.Now` is dependent on the system clock, which may have low resolution on older systems (as low as 15 milliseconds).