Apollo 10.0
自动驾驶开放平台
apollo::cyber::PyTime类 参考

#include <py_time.h>

apollo::cyber::PyTime 的协作图:

Public 成员函数

 PyTime ()=default
 
 PyTime (uint64_t nanoseconds)
 
double to_sec () const
 
uint64_t to_nsec () const
 

静态 Public 成员函数

static PyTime now ()
 
static PyTime mono_time ()
 
static void sleep_until (uint64_t nanoseconds)
 

详细描述

在文件 py_time.h31 行定义.

构造及析构函数说明

◆ PyTime() [1/2]

apollo::cyber::PyTime::PyTime ( )
default

◆ PyTime() [2/2]

apollo::cyber::PyTime::PyTime ( uint64_t  nanoseconds)
inlineexplicit

在文件 py_time.h34 行定义.

34{ time_ = Time(nanoseconds); }
Cyber has builtin time type Time.
Definition time.h:31

成员函数说明

◆ mono_time()

static PyTime apollo::cyber::PyTime::mono_time ( )
inlinestatic

在文件 py_time.h42 行定义.

42 {
43 PyTime t;
44 t.time_ = Time::MonoTime();
45 return t;
46 }
static Time MonoTime()
Definition time.cc:67

◆ now()

static PyTime apollo::cyber::PyTime::now ( )
inlinestatic

在文件 py_time.h36 行定义.

36 {
37 PyTime t;
38 t.time_ = Time::Now();
39 return t;
40 }
static Time Now()
get the current time.
Definition time.cc:57

◆ sleep_until()

static void apollo::cyber::PyTime::sleep_until ( uint64_t  nanoseconds)
inlinestatic

在文件 py_time.h48 行定义.

48 {
49 Time::SleepUntil(Time(nanoseconds));
50 }
static void SleepUntil(const Time &time)
Sleep Until time.
Definition time.cc:112

◆ to_nsec()

uint64_t apollo::cyber::PyTime::to_nsec ( ) const
inline

在文件 py_time.h54 行定义.

54{ return time_.ToNanosecond(); }
uint64_t ToNanosecond() const
convert time to nanosecond.
Definition time.cc:83

◆ to_sec()

double apollo::cyber::PyTime::to_sec ( ) const
inline

在文件 py_time.h52 行定义.

52{ return time_.ToSecond(); }
double ToSecond() const
convert time to second.
Definition time.cc:77

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