What is the appropriate initial value for the ElapsedTime performance counter?

What is the correct starting value for a performance counter ElapsedTime? When my application starts, I set the .RawValueinstance of the performance counter to 0, but this is not true. It seems like it should be based on the current time, but I'm not sure what the actual value I should use is.

+3
source share
1 answer

You must set it to Stopwatch.GetTimestamp();

See this MSDN example.

+4
source

Source: https://habr.com/ru/post/1720112/


All Articles