节点文献
一种实现计算机高精度定时的方法
A Method for High Precision Timing With a Microcomputer
【摘要】 本文叙述了一种在 Windows操作系统下 ,能够实现计算机高精度的简单方便的方法 :通过调用 WindowsAPI函数 Query Performance Counter取得系统计数器的即时值 ,当与前一计数值比较后达到一定的时间间隔 ,就可以进行一定的程序操作 ,从而实现了计算机定时。经测试 ,该方法可以达到 10 ms的定时精度。
【Abstract】 This paper describes a simple method for high precision timing in the Microsoft Windows environment.It first gets the current value of the system counter by calling the API function of QueryPerformanceCounter and then computes the interval by comparing this value with its previous one. In this way it can realize high-precision timing.Tests show that it achieves a timing accuracy of 10 ms.
- 【文献出处】 微型电脑应用 ,Microcomputth Applications , 编辑部邮箱 ,2000年11期
- 【被引频次】6
- 【下载频次】64