Obviously I can do and DateTime.Now.After
- DateTime.Now.Before
but there must be something more sophisticated.
Any tips appreciated.
If milliseconds then in Visual Studio 2019 you can see the time between two breakpoints under Diagnostic Tools -> Events -> Duration (opens automatically in Debug mode, or use Ctrl + Alt + F2 ).
System.Environment.TickCount and the System.Diagnostics.Stopwatch class are two that work well for finer resolution and straightforward usage.
See Also:
I would definitely advise you to have a look at System.Diagnostics.Stopwatch
And when I looked around for more about Stopwatch I found this site;
Beware of the stopwatch
There mentioned another possibility
Process.TotalProcessorTime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With