Welcome![Sign In][Sign Up]
Location:
Search - queryperformancefrequency

Search list

[WEB CodeCPU 测速(MHz)和高精度延时(微秒级)

Description: 一.高精度延时, 是 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
Platform: | Size: 1213 | Author: 马俊 | Hits:

[CSharpCjishitime

Description: 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 (
Platform: | Size: 963 | Author: 奕竹 | Hits:

[OpenGL program2D_curve

Description: 2D的贝塞尔曲线几种画法(2D_curve). 用到QueryPerformanceCounter及QueryPerformanceFrequency的帧速计数.-2D Bezier curves of several paintings (2D_curve). Use QueryPerfor manceCounter frame and QueryPerformanceFrequency speed counts.
Platform: | Size: 63814 | Author: 金哥 | Hits:

[Process-Threadbootstrap

Description: 这个频率与硬件和操作系统都可能有关。利用 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
Platform: | Size: 238447 | Author: xianhao | Hits:

[Other resourcePLC_Control

Description: 欧姆龙最新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
Platform: | Size: 72165 | Author: m__point | Hits:

[WinSock-NDISTimer

Description: 可以通过各种不同的函数来获取时间,且时间精度各不相同如使用QueryPerformanceFrequency()和QueryPerformanceCounter()来进行高精度定时
Platform: | Size: 37383 | Author: 聂山权 | Hits:

[OS programDelay_time

Description: 用C编写的微秒级精确延时DLL函数库,通过调用kernel32.dll的QueryPerformanceFrequency()、QueryPerformanceCounter()函数实现。
Platform: | Size: 94636 | Author: 王学文 | Hits:

[Booksbcb深度历险

Description: 《bcb深度历险》 电子书- Bcb depth Adventures e-books
Platform: | Size: 7988224 | Author: | Hits:

[DocumentsCPU 测速(MHz)和高精度延时(微秒级)

Description: 一.高精度延时, 是 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
Platform: | Size: 1024 | Author: 马俊 | Hits:

[CSharpCjishitime

Description:
Platform: | Size: 1024 | Author: 奕竹 | Hits:

[OpenGL program2D_curve

Description: 2D的贝塞尔曲线几种画法(2D_curve). 用到QueryPerformanceCounter及QueryPerformanceFrequency的帧速计数.-2D Bezier curves of several paintings (2D_curve). Use QueryPerfor manceCounter frame and QueryPerformanceFrequency speed counts.
Platform: | Size: 63488 | Author: 金哥 | Hits:

[Process-Threadbootstrap

Description: 这个频率与硬件和操作系统都可能有关。利用 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
Platform: | Size: 238592 | Author: xianhao | Hits:

[Other systemsPLC_Control

Description: 欧姆龙最新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
Platform: | Size: 71680 | Author: | Hits:

[Internet-NetworkTimer

Description: 可以通过各种不同的函数来获取时间,且时间精度各不相同如使用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
Platform: | Size: 36864 | Author: 聂山权 | Hits:

[OS programDelay_time

Description: 用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.
Platform: | Size: 94208 | Author: 王学文 | Hits:

[Windows Developabcd

Description: 快速排序与交换排序算法比较 在Visual C++中建立一个单文档Windows应用程序,并实现下述功能: 运用随机函数自动生成一定规模的测试数据 (10000个测试元素),并输出到文件中。 分别执行快速排序算法和交换排序算法对测试数据排序,并输出到不同的文件中。 使用较为精确的QueryPerformanceCounter和QueryPerformanceFrequency等函数记录算法耗时,精确到毫秒,以便更好地进行算法耗时比较。 分析两种不同算法,有针对性地设计与调整测试数据,进而通过比较算法耗时来得到更充分且更深刻的认识。 编写模块校验两种不同排序算法的输出结果正确且相同 -Quicksort sorting algorithm comparison and exchange In the Visual C++ to create a single document Windows application, and to achieve the following functions: The use of random function automatically generates a certain amount of test data (10000 test elements), and output to a file. Respectively, and the exchange of the implementation of quick sort algorithm sorting algorithm to sort of test data, and output to a different file. Using a more accurate record of QueryPerformanceCounter and QueryPerformanceFrequency algorithms such as time-consuming functions, accurate to the millisecond, in order to better carry out time-consuming compared algorithms. Analysis of two different algorithms, targeted design and adjustment of test data, and then by comparing the algorithm is time-consuming to get a fuller and more profound understanding. The preparation of the module check the output of two different sorting algorithm and the same result is correct
Platform: | Size: 3632128 | Author: jane | Hits:

[Windows DevelopTxRefTool

Description: .NET设计规范.NET约定惯用法与模式-Stopwatch class is a managed wrapper for Win32 QueryPerformanceCounter and QueryPerformanceFrequency APIs. It provides a simple API for high-precision and high-resolution measurements of elapsed time. The APIs are commonly used for performance testing, tuning, and instrumentation.
Platform: | Size: 574464 | Author: 刘强 | Hits:

[Windows DevelopMultiTimer

Description: 程序列出所有的计时方法和计时应用,WM_TIMER、Sleep()、利用COleDateTime类和COleDateTimeSpan类、利用GetTickCount()函数、利用 timeGetTime()函数、利用 timeSetEvent()函数和使用QueryPerformanceFrequency()和QueryPerformanceCounter()函数实现高精度定时-Program lists all of the timing method and timing applications, WM_TIMER, Sleep (), use COleDateTime class and COleDateTimeSpan class, using GetTickCount () function, using timeGetTime () function, using timeSetEvent () function and use of QueryPerformanceFrequency () and QueryPerformanceCounter () function for high precision time
Platform: | Size: 1651712 | Author: 王琳伟 | Hits:

[OS programctimer

Description: 基于Windows MFC的高精度计时代码,方便需要精确计时的朋友。 CTimer-Using QueryPerformanceFrequency and QueryPerformanceCounter to perform high timing precision on windows platform.
Platform: | Size: 2048 | Author: highrisk | Hits:

[Othertimer

Description: timesetevent和QueryPerformanceFrequency 作为定时器的比较,实现了这2个函数的定时功能,并显示各自的定时时间-Timesetevent and QueryPerformanceFrequency As a comparison of the timer, realized this 2 function in the time function, and shows the timing of their time
Platform: | Size: 1881088 | Author: 张烜 | Hits:
« 12 »

CodeBus www.codebus.net