是否StopWatch.ElapsedTicks和StopWatch.Elapsed.Ticks总是一样的? [英] Are StopWatch.ElapsedTicks and StopWatch.Elapsed.Ticks always the same?
问题描述
这是什么 ElapsedTicks
和 Elapsed.Ticks
在秒表类是什么意思?意思当可能不同于预期?
What does ElapsedTicks
and Elapsed.Ticks
in the StopWatch class mean? When could the meaning be different than intended?
推荐答案
我刚刚发现的秒表类ElapsedTicks并不意味着真正的滴答如果StopWatch.isHighResolution为True
I just found out that ElapsedTicks in the StopWatch class doesn't mean real "ticks" if StopWatch.isHighResolution is True
请注意(如果isHighResolution是真):
秒表滴答来自不同 日期时间.. ::。蜱。在每个刻度 日期时间.. ::。蜱转口货值为presents 一个100纳秒的时间间隔。每个刻度 在ElapsedTicks商品转口货值presents 的时间间隔等于1秒 由频率划分
Stopwatch ticks are different from DateTime..::.Ticks. Each tick in the DateTime..::.Ticks value represents one 100-nanosecond interval. Each tick in the ElapsedTicks value represents the time interval equal to 1 second divided by the Frequency.
您可以自己算算高于或它似乎可以使用 StopWatch.Elapsed.Ticks 而不是 StopWatch.ElapsedTicks
You can do the math above or it seem you can use StopWatch.Elapsed.Ticks instead of StopWatch.ElapsedTicks
这篇关于是否StopWatch.ElapsedTicks和StopWatch.Elapsed.Ticks总是一样的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!