真正的高精度延时代码

易语言 2020-09-28 16:32:06

真正的高精度延时代码

QueryPerformanceFrequency (TicksCount)
QueryPerformanceCounter (CurrTicks)
TicksCount.QuadPart = TicksCount.QuadPart × 要延时的时间 ÷ 1000000
TicksCount.QuadPart = TicksCount.QuadPart + CurrTicks.QuadPart
.判断循环首 (CurrTicks.QuadPart < TicksCount.QuadPart)
QueryPerformanceCounter (CurrTicks)
.判断循环尾 ()