Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the appropriate initial value for a ElapsedTime Performance Counter?

What is the proper initial value for an ElapsedTime performance counter? When my app starts up I am setting the .RawValue of the performance counter instance to 0 but that is not correct. It looks like it needs to be based on the current time but I'm not sure what is the actual value I should be using.

like image 441
Eric Schoonover Avatar asked Nov 27 '25 21:11

Eric Schoonover


1 Answers

You should set it to Stopwatch.GetTimestamp();

See this MSDN example

like image 165
Henk Holterman Avatar answered Nov 30 '25 10:11

Henk Holterman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!