You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
626 B
C++
29 lines
626 B
C++
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//文件 TimeCount.h
|
|
//主要功能:
|
|
// 精确获得算法处理时间的类(毫秒量级)
|
|
//
|
|
//程序编写: 2005-12-07
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
class CTimeCount
|
|
{
|
|
public:
|
|
CTimeCount(void);
|
|
virtual ~CTimeCount(void);
|
|
|
|
void Start(void); //计时开始
|
|
void End(void); //计时结束
|
|
double GetUseTime(void); //获得使用时间(单位:秒)
|
|
BOOL IsBeginCounter(void);
|
|
|
|
private:
|
|
double UseTime; // 算法处理时间(单位:秒)
|
|
clock_t ClockStart; // 计数值
|
|
LARGE_INTEGER old; // 计数值
|
|
BOOL m_bBegin;
|
|
};
|