是否StopWatch.ElapsedTicks和StopWatch.Elapsed.Ticks总是一样的? [英] Are StopWatch.ElapsedTicks and StopWatch.Elapsed.Ticks always the same?

查看:175
本文介绍了是否StopWatch.ElapsedTicks和StopWatch.Elapsed.Ticks总是一样的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是什么 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆