Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - QueryPerformanceCounter
Search - QueryPerformanceCounter - List
一.高精度延时, 是 CPU 测速的基础 Windows 内部有一个精度非常高的定时器, 精度在微秒级, 但不同的系统这个定时器的频率不同, 这个频率与硬件和操作系统都可能有关。 利用 API 函数 QueryPerformanceFrequency 可以得到这个定时器的频率。 利用 API 函数 QueryPerformanceCounter 可以得到定时器的当前值。 根据要延时的时间和定时器的频率, 可以算出要延时的时间定时器经过的周期数。 在循环里用 QueryPerformanceCounter 不停的读出定时器值, 一直到经过了指定周期数再结束循环, 就达到了高精度延时的目的。 高精度延时的程序, 参数: 微秒 二.测速程序 利用 rdtsc 汇编指令可以得到 CPU 内部定时器的值, 每经过一个 CPU 周期, 这个定时器就加一。 如果在一段时间内数得 CPU 的周期数, CPU工作频率 = 周期数 / 时间 为了不让其他进程和线程打扰, 必需要设置最高的优先级 以下函数设置当前进程和线程到最高的优先级。 SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS) SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL) CPU 测速程序的源代码, 这个程序通过 CPU 在 1/16 秒的时间内经过的周期数计算出工作频率, 单位 MHz: -one. High-precision delay, the CPU speed is the basis of Windows within a very high accuracy of the timer, the microsecond precision, but in the system timer different frequencies, the frequency and hardware and the operating system are likely. Using API function can be QueryPerformanceFrequency the timing The frequency. Use QueryPerformanceCounter API function can be the current timer value. According to the delay time and the frequency of the timer, you could calculate the time to delay timer after a few cycles. The circle with QueryPerformanceCounter repeatedly read out the timer value, until after a specified number of cycles end the cycle again, it reached a high precision delay purposes. High-precision delay the procedure parameters : 2 microsecond. Gun utilize RDTSC instruction can
Date : 2008-10-13 Size : 1.18kb User : 马俊

DL : 0
C计时程序源代码 void mytime1() { static LARGE_INTEGER startTime QueryPerformanceCounter(&startTime) static LARGE_INTEGER timerFrequency -time C source code void mytime1 () (static LARGE_INTEGER startTime QueryPerformanceCounter (
Date : 2008-10-13 Size : 5.25kb User : 奕竹

DL : 0
C计时程序源代码 void mytime1() { static LARGE_INTEGER startTime QueryPerformanceCounter(&startTime) static LARGE_INTEGER timerFrequency QueryPerformanceFrequency(&timerFrequency) /////////////***你要计时的程序-time C source code void mytime1 () (static LARGE_INTEGER startTime QueryPerformanceCounter (
Date : 2008-10-13 Size : 963byte User : 奕竹

2D的贝塞尔曲线几种画法(2D_curve). 用到QueryPerformanceCounter及QueryPerformanceFrequency的帧速计数.-2D Bezier curves of several paintings (2D_curve). Use QueryPerfor manceCounter frame and QueryPerformanceFrequency speed counts.
Date : 2008-10-13 Size : 62.32kb User : 金哥

精确到1us的定时器。使用QueryPerformanceCounter()函数实现 适用于实时控制环境-accurate to the timer. Use QueryPerformanceCounter () functions applicable to real-time control environment
Date : 2008-10-13 Size : 23.76kb User : 李新

这个频率与硬件和操作系统都可能有关。利用 API 函数 QueryPerformanceFrequency 可以得到 这个定时器的频率。利用 API 函数 QueryPerformanceCounter 可以得到定时器的当前值。根据 要延时的时间和定时器的频率, 可以算出要延时的时间定时器经过的周期数。在循环里用 QueryPerformanceCounter 不停的读出定时器值, 一直到经过了指定周期数再结束循环, 就达到-the frequency with hardware and the operating system are likely. Using API function can be QueryPerformanceFrequency the timing The frequency. QueryPerformanceCounter API function can be present timer value. According to the delay time and the frequency of the timer, you could calculate the time to delay timer after a few cycles. In the circle with QueryPerformanceCounter kept read timer value, until after a specified number of cycles end the cycle again, to achieve
Date : 2008-10-13 Size : 232.86kb User : xianhao

欧姆龙最新PLC CPH1系列hostlink应用例子,用于编写上位机控制软件,通过串口直接控制PLC。用vc编写,方便转化为其他语言。 包括内容: 1:自封装串口类(来源于网络,做了适当修改) 2:多线程,线程间同步,通讯等。 3:生产者消费者模型应用,环形缓冲队列应用 4:欧姆龙hostlink通讯通讯同步处理,FCS校验值计算,各种hostlink指令使用示例。 5:线程消息处理类封装。 6:windows程序中带console调试界面,可把调试信息输出到控制台窗口及文件。 7:windows界面调试工具。(win32多线程程序设计一书中WM_COPYDATA例子封装,运行程序前启动目录中CopyRecv程序。) 8:自封装高精度计时器。(QueryPerformanceFrequency,QueryPerformanceCounter) 9:其他详见代码,此测试程序对初学者非常有帮助,而请大虾多指教。 e-mail:m__point@163.com -OMRON PLC CPH1 latest series hostlink application examples, for the preparation of PC control software through direct serial control PLC. Prepared using vc facilitate conversion to other languages. Including : 1 : Since Packaging serial category (from the network, so the appropriate modifications) 2 : multiple threads, thread synchronization, communications. 3 : Producer consumer model, a circular buffer queue application 4 : OMRON hostlink synchronous communications Communications, FCS checksum calculation, hostlink various examples of the use of directives. 5 : threaded message processing category Packaging. 6 : windows proceedings with console debugging interface Debugging information can be output to the console window and documents. 7 : windows interface debugging tools. (Win32 multit
Date : 2008-10-13 Size : 70.47kb User : m__point

可以通过各种不同的函数来获取时间,且时间精度各不相同如使用QueryPerformanceFrequency()和QueryPerformanceCounter()来进行高精度定时
Date : 2008-10-13 Size : 36.51kb User : 聂山权

用C编写的微秒级精确延时DLL函数库,通过调用kernel32.dll的QueryPerformanceFrequency()、QueryPerformanceCounter()函数实现。
Date : 2008-10-13 Size : 92.42kb User : 王学文

一.高精度延时, 是 CPU 测速的基础 Windows 内部有一个精度非常高的定时器, 精度在微秒级, 但不同的系统这个定时器的频率不同, 这个频率与硬件和操作系统都可能有关。 利用 API 函数 QueryPerformanceFrequency 可以得到这个定时器的频率。 利用 API 函数 QueryPerformanceCounter 可以得到定时器的当前值。 根据要延时的时间和定时器的频率, 可以算出要延时的时间定时器经过的周期数。 在循环里用 QueryPerformanceCounter 不停的读出定时器值, 一直到经过了指定周期数再结束循环, 就达到了高精度延时的目的。 高精度延时的程序, 参数: 微秒 二.测速程序 利用 rdtsc 汇编指令可以得到 CPU 内部定时器的值, 每经过一个 CPU 周期, 这个定时器就加一。 如果在一段时间内数得 CPU 的周期数, CPU工作频率 = 周期数 / 时间 为了不让其他进程和线程打扰, 必需要设置最高的优先级 以下函数设置当前进程和线程到最高的优先级。 SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS) SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL) CPU 测速程序的源代码, 这个程序通过 CPU 在 1/16 秒的时间内经过的周期数计算出工作频率, 单位 MHz: -one. High-precision delay, the CPU speed is the basis of Windows within a very high accuracy of the timer, the microsecond precision, but in the system timer different frequencies, the frequency and hardware and the operating system are likely. Using API function can be QueryPerformanceFrequency the timing The frequency. Use QueryPerformanceCounter API function can be the current timer value. According to the delay time and the frequency of the timer, you could calculate the time to delay timer after a few cycles. The circle with QueryPerformanceCounter repeatedly read out the timer value, until after a specified number of cycles end the cycle again, it reached a high precision delay purposes. High-precision delay the procedure parameters : 2 microsecond. Gun utilize RDTSC instruction can
Date : 2025-07-03 Size : 1kb User : 马俊

DL : 0
C计时程序源代码 void mytime1() { static LARGE_INTEGER startTime QueryPerformanceCounter(&startTime) static LARGE_INTEGER timerFrequency -time C source code void mytime1 () (static LARGE_INTEGER startTime QueryPerformanceCounter (
Date : 2025-07-03 Size : 5kb User : 奕竹

DL : 0

Date : 2025-07-03 Size : 1kb User : 奕竹

毫秒定时器,为什么要使用毫秒定时器呢?我想原因有两个。第一:CWnd里面的timer不能精确到毫秒级,所以必须要写一个精确到毫秒级的。第二:用CWnd里面的timer代价太大,因为有时我们的类根本就没有窗口,为了使用timer,而不得不从CWnd里派生。本人写的这个mmtimer,主要是为了解决上面这两点而设计的-millisecond timer, why should the use of millisecond timer? I think there are two reasons. First : CWnd not inside the timer accurate to the millisecond, we must write an accurate to the millisecond. Second : CWnd timer inside the price is too high, because sometimes we simply do not like the window, In order to use the timer, which had derived from CWnd Lane. I wrote this mmtimer, is mainly to solve the above two points and design
Date : 2025-07-03 Size : 110kb User : zniao

2D的贝塞尔曲线几种画法(2D_curve). 用到QueryPerformanceCounter及QueryPerformanceFrequency的帧速计数.-2D Bezier curves of several paintings (2D_curve). Use QueryPerfor manceCounter frame and QueryPerformanceFrequency speed counts.
Date : 2025-07-03 Size : 62kb User : 金哥

精确到1us的定时器。使用QueryPerformanceCounter()函数实现 适用于实时控制环境-accurate to the timer. Use QueryPerformanceCounter () functions applicable to real-time control environment
Date : 2025-07-03 Size : 24kb User : 李新

这个频率与硬件和操作系统都可能有关。利用 API 函数 QueryPerformanceFrequency 可以得到 这个定时器的频率。利用 API 函数 QueryPerformanceCounter 可以得到定时器的当前值。根据 要延时的时间和定时器的频率, 可以算出要延时的时间定时器经过的周期数。在循环里用 QueryPerformanceCounter 不停的读出定时器值, 一直到经过了指定周期数再结束循环, 就达到-the frequency with hardware and the operating system are likely. Using API function can be QueryPerformanceFrequency the timing The frequency. QueryPerformanceCounter API function can be present timer value. According to the delay time and the frequency of the timer, you could calculate the time to delay timer after a few cycles. In the circle with QueryPerformanceCounter kept read timer value, until after a specified number of cycles end the cycle again, to achieve
Date : 2025-07-03 Size : 233kb User : xianhao

欧姆龙最新PLC CPH1系列hostlink应用例子,用于编写上位机控制软件,通过串口直接控制PLC。用vc编写,方便转化为其他语言。 包括内容: 1:自封装串口类(来源于网络,做了适当修改) 2:多线程,线程间同步,通讯等。 3:生产者消费者模型应用,环形缓冲队列应用 4:欧姆龙hostlink通讯通讯同步处理,FCS校验值计算,各种hostlink指令使用示例。 5:线程消息处理类封装。 6:windows程序中带console调试界面,可把调试信息输出到控制台窗口及文件。 7:windows界面调试工具。(win32多线程程序设计一书中WM_COPYDATA例子封装,运行程序前启动目录中CopyRecv程序。) 8:自封装高精度计时器。(QueryPerformanceFrequency,QueryPerformanceCounter) 9:其他详见代码,此测试程序对初学者非常有帮助,而请大虾多指教。 e-mail:m__point@163.com -OMRON PLC CPH1 latest series hostlink application examples, for the preparation of PC control software through direct serial control PLC. Prepared using vc facilitate conversion to other languages. Including : 1 : Since Packaging serial category (from the network, so the appropriate modifications) 2 : multiple threads, thread synchronization, communications. 3 : Producer consumer model, a circular buffer queue application 4 : OMRON hostlink synchronous communications Communications, FCS checksum calculation, hostlink various examples of the use of directives. 5 : threaded message processing category Packaging. 6 : windows proceedings with console debugging interface Debugging information can be output to the console window and documents. 7 : windows interface debugging tools. (Win32 multit
Date : 2025-07-03 Size : 70kb User :

可以通过各种不同的函数来获取时间,且时间精度各不相同如使用QueryPerformanceFrequency()和QueryPerformanceCounter()来进行高精度定时-Through a variety of functions to obtain time and time accuracy, such as the use of different QueryPerformanceFrequency () and QueryPerformanceCounter () to carry out high-precision timing
Date : 2025-07-03 Size : 36kb User : 聂山权

用C编写的微秒级精确延时DLL函数库,通过调用kernel32.dll的QueryPerformanceFrequency()、QueryPerformanceCounter()函数实现。-Prepared with C-level precision microsecond delay DLL function library, by calling the kernel32.dll of QueryPerformanceFrequency (), QueryPerformanceCounter () function.
Date : 2025-07-03 Size : 92kb User : 王学文

DL : 0
用VC++编程,比较三种定时器——SetTimer、timeSetEvent、、QueryPerformanceCounter、GetTickCount的在精度上的差别-Using VC++ programming, comparing three types of timers- SetTimer, timeSetEvent,, QueryPerformanceCounter, GetTickCount the difference in accuracy
Date : 2025-07-03 Size : 714kb User : Edison
« 12 »
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.