Windows10/11的时钟精度能够达到多少?

匿名
2024-01-18T07:28:43+00:00

您好!

需求是我需要通过编程去测量一个极短过程所持续的时间,

我想到的方法是在过程开始时和过程结束时分别获取时间戳,

两个时间戳的差值即为该过程的持续时间,

网上查了一些资料,说法不一,

请问能否达到微秒级准确度?

如果能附上核心代码(C/C++)那最好了。

非常感谢!

Windows 适用于 IT 专业人员的 Windows 客户端性能和维护系统性能

锁定的问题。 此问题已从 Microsoft 支持社区迁移。 你可投票决定它是否有用,但不能添加评论或回复,也不能关注问题。 为了保护隐私,对于已迁移的问题,用户个人资料是匿名的。

0 个注释 无注释
{count} 票

5 个答案

排序依据: 非常有帮助
  1. 匿名
    2024-01-19T02:18:20+00:00

    Hello

    Thank you for posting in Microsoft Community forum!

    Based on the description, I understand your question is related to C++.

    Since there are no engineers dedicated to this topic in this forum, in order to be able to get a quick and effective handling of your issue, I recommend that you repost your question in Stack Overflow or Microsoft Q&A, they are designed for developers.

    Thank you for your understanding and support. If you have any question or concern, please feel free to let us know.

    Have a nice day!

    Best Regards,

    Wesley Li

    0 个注释 无注释
  2. 匿名
    2024-01-19T02:27:58+00:00

    感谢答复!

    “如果能附上核心代码(C/C++)那最好了。”,可否暂时忽略这句话?

    从系统性能或硬件角度,能否帮助解答一下?

    因为我四处查,也查不到准确信息(包括微软客服电话),而项目又很急

    谢谢!

    0 个注释 无注释
  3. 匿名
    2024-01-25T06:36:43+00:00

    Sorry, since this forum is not specifically targeted at engineers with a programming background, in order for your question to be addressed quickly and efficiently, I recommend that you republish your question in Stack Overflow or Microsoft Q&A, which are designed for developers.

    0 个注释 无注释
  4. 匿名
    2024-01-25T07:12:54+00:00

    感谢回复!

    我在Microsoft Q&A上发布了,回复依然是让我查代码帮助文档,我很后悔提到函数名或编程这样的词汇。我想说,撇开代码不说,就没有人能真正说清或愿意说Windows能够达到什么级别的时钟精度吗?是不好意思吗?有什么不好意思的,Windows不是RTOS系统我知道,我的心理预期没那么高!唉...

    0 个注释 无注释
  5. 匿名
    2024-02-07T07:25:49+00:00

    Windows 中的时钟精度在最新版本中得到了显着提高。 在合理的操作条件下,运行 Windows 10 或 Windows Server 2016 及更新版本的系统可以配置为保持高精度。

    对于 1 秒的精度,系统应该能够在正常操作条件下保持这一精度水平。

    对于 50 毫秒 (ms) 的精度,系统应能够在正常操作条件下保持此精度水平。

    为了达到 1 毫秒 (ms) 或更高的精度,系统应能够在合理的操作条件下相对于协调世界时 (UTC) 保持这一精度水平。

    您可以通过与原子钟进行比较来检查系统时钟的准确性。 显示时间的准确度或精度为 0.02-0.10 秒,这取决于您的互联网连接和计算机的繁忙程度。

    参考文档:

    Configuring systems for high accuracy | Microsoft Learn

    Support boundary for high-accuracy time - Windows Server | Microsoft Learn

    0 个注释 无注释