c++ 统计函数执行时间class
来源:互联网 发布:mac用什么看图软件好 编辑:程序博客网 时间:2024/05/03 16:04
class TimeCount
{
public:
TimeCount(void);
~TimeCount(void);
void StartCount();
void EndCount(OUT double * seconds = NULL, IN bool print=false);
private:
clock_t m_start;
clock_t m_end;
};
TimeCount::TimeCount(void)
{
}
TimeCount::~TimeCount(void)
{
}
void TimeCount::StartCount()
{
m_start = clock();
}
void TimeCount::EndCount( OUT double * seconds /*= NULL*/, IN bool print )
{
m_end = clock();
double z_seconds = ((double)(m_end-m_start))/CLOCKS_PER_SEC;
if (seconds!=NULL)
{
*seconds = z_seconds;
}
if (print)
{
printf("<>函数执行了%f秒<> \n", z_seconds );
}
}
0 0
- c++ 统计函数执行时间class
- linux c代码 统计函数执行时间
- linux 函数执行时间统计
- GPROF 统计函数执行时间
- C#: 统计method的执行时间
- 用于统计函数执行时间的类
- c语言 计算函数执行时间
- linux c 时间函数,获取程序执行时间
- C语言获得函数的执行时间
- linux c语言 计算函数执行时间
- linux c语言 计算函数执行时间
- Object-C、iOS函数执行时间方法
- Linux下的函数执行时间的统计方法
- Linux下的函数执行时间的统计方法
- Linux下的函数执行时间的统计方法
- Linux下的函数执行时间的统计方法
- Linux下的函数执行时间的统计方法
- Linux下的函数执行时间的统计方法
- 使用Protocol Buffers入门四步骤
- Android实现卡拉OK字幕效果方法
- STM8S003的定时器
- JS启用本地安卓APP的方法
- 用于快递查询API接口集成查询
- c++ 统计函数执行时间class
- java.lang.NoClassDefFoundError错误解决方法
- 排序
- Collection
- php面试题(1)
- cdrtools生成&刻录2gb镜像时间
- Aanroid 加载so库失败:java.lang.UnsatisfiedLinkError
- leetcode 134. Gas Station
- Eclipse调试过程中,如何修改变量的值?