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

#include <timer.h>

apollo::perception::camera::Timer 的协作图:

Public 成员函数

 Timer ()
 
void Tic ()
 
uint64_t Toc ()
 

Protected 属性

struct timeval start_tv_
 

详细描述

在文件 timer.h24 行定义.

构造及析构函数说明

◆ Timer()

apollo::perception::camera::Timer::Timer ( )
inline

在文件 timer.h26 行定义.

成员函数说明

◆ Tic()

void apollo::perception::camera::Timer::Tic ( )
inline

在文件 timer.h27 行定义.

27{ gettimeofday(&start_tv_, nullptr); }

◆ Toc()

uint64_t apollo::perception::camera::Timer::Toc ( )
inline

在文件 timer.h28 行定义.

28 {
29 struct timeval end_tv;
30 gettimeofday(&end_tv, nullptr);
31 uint64_t elapsed = (end_tv.tv_sec - start_tv_.tv_sec) * 1000000 +
32 (end_tv.tv_usec - start_tv_.tv_usec);
33 Tic();
34 return elapsed;
35 }

类成员变量说明

◆ start_tv_

struct timeval apollo::perception::camera::Timer::start_tv_
protected

在文件 timer.h38 行定义.


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