开发者

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

开发者 https://www.devze.com 2022-12-07 23:39 出处:网络
What is the proper initial value for an Elap开发者_StackOverflowsedTime performance counter?When my app starts up I am setting the .RawValue of the performance counter instance to 0 but that is not co

What is the proper initial value for an Elap开发者_StackOverflowsedTime 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.


You should set it to Stopwatch.GetTimestamp();

See this MSDN example

0

精彩评论

暂无评论...
验证码 换一张
取 消