⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rdtsc.h

📁 实时监控
💻 H
字号:
/*
 *	An alternative of the "RDTSC" instruction
 *	by Mr.Nodman
 *	2003-12-03
 */

#ifndef _RDTSC_H
#define _RDTSC_H

#pragma warning(disable:4035)	// disable warning: "no return value"
extern ULONGLONG get_tick_count()
{
	/*
	 *	high precision version "GetTickCount"
	 *	which could read time interval up to nano-second
	 *
	 *	the following instructions are equal to instruction "rdtsc"
	 *	after execution an unsigned __int64 integer is 
	 *	pushed into stack as a return value.
	 *	that is what we want.
	 *
	 *	ok, some versions of compilers recognize "RDTSC"
	 */
	__asm _emit 0x0f
	__asm _emit 0x31
	//__asm rdtsc
}
#pragma warning(default:4035)

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -