📄 elapsetime.cpp
字号:
#include "stdafx.h"
#include "elapsetime.h"
unsigned __int64 GetCycleCount(void){
__asm _emit 0x0F;
__asm _emit 0x31;
}
static unsigned long TimeOfBegine;
static unsigned long TimeOfEnd;
static double TimeOfElapse;
void CycleCountStart(void){
TimeOfBegine = (unsigned long) GetCycleCount();
}
void CycleCountEnd (void){
TimeOfEnd=(unsigned long) GetCycleCount();
}
double CycleCountElapse(void){
TimeOfElapse=(TimeOfEnd-TimeOfBegine)/1000000.0; //ms
return TimeOfElapse;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -