QueryPerformanceCounter() return 32 位机器的正确值(无溢出)需要多长时间?
How long will QueryPerformanceCounter() return the correct value for 32 bit machine (without overflows)?
QueryPerformanceCounter return 是否是 32 位计算机的正确值,它可以运行超过一个月甚至几个月或几年?
谢谢
Microsoft 保证 QueryPerformanceCounter 不会在启动后 100 年内滚动:引用 https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps#general-faq-about-qpc-and-tsc
How often does QPC roll over?
Not less than 100 years from the most recent system boot, and potentially longer based on the underlying hardware timer used. For most applications, rollover isn't a concern.
您不能仅从 QueryPerformanceCounter 生成 64 位值这一事实推断出这一点。用于实现QPC的硬件时钟可能范围更小,Windows可能只是zero-extending那个时钟到 64 位。这在您询问的较旧的 32 位系统上尤其合理。仅应依赖翻转间隔的明确文档。
QueryPerformanceCounter return 是否是 32 位计算机的正确值,它可以运行超过一个月甚至几个月或几年?
谢谢
Microsoft 保证 QueryPerformanceCounter 不会在启动后 100 年内滚动:引用 https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps#general-faq-about-qpc-and-tsc
How often does QPC roll over?
Not less than 100 years from the most recent system boot, and potentially longer based on the underlying hardware timer used. For most applications, rollover isn't a concern.
您不能仅从 QueryPerformanceCounter 生成 64 位值这一事实推断出这一点。用于实现QPC的硬件时钟可能范围更小,Windows可能只是zero-extending那个时钟到 64 位。这在您询问的较旧的 32 位系统上尤其合理。仅应依赖翻转间隔的明确文档。