gpt4 book ai didi

delphi - TTimer 的准确度如何?

转载 作者:行者123 更新时间:2023-12-03 15:23:20 25 4
gpt4 key购买 nike

当我将 TTimer 间隔设置为 1 时,它实际上是每 1 毫秒执行一次代码,还是每 20 毫秒或类似的东西?

我问这个问题是因为我知道 Windows API Sleep() 函数不准确,所以我想知道它对于 TTimer 是否相同。

最佳答案

The standard VCL TTimer component is a wrapper for the Windows API timer functions SetTimer and KillTimer. TTimer simplifies the processing of the WM_TIMER messages by converting them into OnTimer events. A timer based on WM_TIMER message processing cannot provide a resolution better than 10 milliseconds.

Source: Sergworks

关于delphi - TTimer 的准确度如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30009479/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com