test.cpp

来自「精确测试」· C++ 代码 · 共 55 行

CPP
55
字号
// test.cpp: implementation of the test class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Performance.h"
#include "test.h"
#include <mmsystem.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

test::test()
{

}

test::~test()
{

}
void Block1(){
}
void Block2(){
}
void functionB();


void functionA(void) {	

BM_START(0)		// 对functionB整体计时
	functionB();
BM_END(0)			
}

void functionB(void){
	
BM_START(1)		// 嵌套计时,模块1	
	Block1();
BM_END(1)

BM_START(2)		// 嵌套计时,模块2
	Block2();
BM_END(2)	
}



⌨️ 快捷键说明

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