Apollo 10.0
自动驾驶开放平台
apollo::common::util::Timer类 参考

#include <perf_util.h>

apollo::common::util::Timer 的协作图:

Public 成员函数

 Timer ()=default
 
void Start ()
 
int64_t End (const std::string &msg)
 

详细描述

在文件 perf_util.h70 行定义.

构造及析构函数说明

◆ Timer()

apollo::common::util::Timer::Timer ( )
default

成员函数说明

◆ End()

int64_t apollo::common::util::Timer::End ( const std::string &  msg)

在文件 perf_util.cc55 行定义.

55 {
56 end_time_ = Time::Now();
57 int64_t elapsed_time = (end_time_ - start_time_).ToNanosecond() / 1e6;
58 ADEBUG << "TIMER " << msg << " elapsed_time: " << elapsed_time << " ms";
59
60 // start new timer.
61 start_time_ = end_time_;
62 return elapsed_time;
63}
static Time Now()
get the current time.
Definition time.cc:57
#define ADEBUG
Definition log.h:41

◆ Start()

void apollo::common::util::Timer::Start ( )

在文件 perf_util.cc53 行定义.

53{ start_time_ = Time::Now(); }

该类的文档由以下文件生成: