|
分享源码
界面截图: |
|
是否带模块: |
- |
备注说明: |
- |
- <P>.版本 2
- .子程序 真正的高精度延时
- .参数 要延时的时间, 整数型, , 微秒,1000微秒=1毫秒,1000毫秒=1秒
- .局部变量 CurrTicks, LARGE_INTEGER
- .局部变量 TicksCount, LARGE_INTEGER
- QueryPerformanceFrequency (TicksCount)
- QueryPerformanceCounter (CurrTicks)
- TicksCount.QuadPart = TicksCount.QuadPart × 要延时的时间 ÷ 1000000
- TicksCount.QuadPart = TicksCount.QuadPart + CurrTicks.QuadPart
- .判断循环首 (CurrTicks.QuadPart < TicksCount.QuadPart)
- QueryPerformanceCounter (CurrTicks)
- .判断循环尾 ()
- </P>
- <P>.DLL命令 QueryPerformanceCounter, 整数型, "kernel32", "QueryPerformanceCounter", , 获取计数值
- .参数 lpPerformanceCount, LARGE_INTEGER</P>
- <P>.DLL命令 QueryPerformanceFrequency, 整数型, "kernel32", "QueryPerformanceFrequency", , 返回计数频率
- .参数 lpFrequency, LARGE_INTEGER
- </P>
- <P>.数据类型 LARGE_INTEGER, , '呵呵这里一定要这个数据类型,如果直接写成整数型的话,运行不了的
- .成员 QuadPart, 整数型
- </P>
复制代码
高精度.rar
(1.31 KB, 下载次数: 163)
|
|