系统时钟调整会影响在C#中跑秒表吗? [英] Will a system clock adjust affect running the stopwatch in C#?

查看:133
本文介绍了系统时钟调整会影响在C#中跑秒表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说我有秒表在我的代码,并在中间运行,其他一些应用已经改变了系统时钟(我有域时间我的服务器上同步每秒)

Let's say I have Stopwatch running in my code and in the middle, some other application has changed the system clock (I have Domain Time on my server syncing every second).

这是否会影响秒表结果?

Will it affect the stopwatch result?

推荐答案

没有,内部秒表依赖于Win32的 QueryPerformanceCounter的( )它不依赖于系统时钟。

No, internally Stopwatch relies on Win32 QueryPerformanceCounter() which is not tied to the system clock.

这篇关于系统时钟调整会影响在C#中跑秒表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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