elapsetime.cpp
来自「DSP图像处理程序源码」· C++ 代码 · 共 23 行
CPP
23 行
#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 + =
减小字号Ctrl + -
显示快捷键?