I need to calculate duration for my system running. My system in c#.
I’ve set:
DateTime startRunningProg = Date.Time.Now("o");
after a few process.
I set :
DateTime endRunningProg = Date.Time.Now("o");
How to calculate duration for my system running in millisec or sec.
to accurately measure elapsed time, use StopWatch class: