Curious that not one of them has reviewed the Stopwatch yet?
Accurate and larger than System.Environment.TickCount , not related to horrible OS performances, WMI or native calls, and very simple:
var ticks = Stopwatch.GetTimestamp(); var uptime = ((double)ticks) / Stopwatch.Frequency; var uptimeSpan = TimeSpan.FromSeconds(uptime);
Rbjz Apr 29 '14 at 14:12 2014-04-29 14:12
source share