Public Member Functions | List of all members
rs2rosinternal::Duration Class Reference

Duration representation for use with the Time class. More...

#include <duration.h>

Inheritance diagram for rs2rosinternal::Duration:
Inheritance graph
[legend]

Public Member Functions

 Duration ()
 
 Duration (int32_t _sec, int32_t _nsec)
 
 Duration (double t)
 
 Duration (const Rate &)
 
bool sleep () const
 sleep for the amount of time specified by this Duration. If a signal interrupts the sleep, resleeps for the time remaining. More...
 
- Public Member Functions inherited from rs2rosinternal::DurationBase< Duration >
 DurationBase ()
 
 DurationBase (int32_t _sec, int32_t _nsec)
 
 DurationBase (double t)
 
DurationfromNSec (int64_t t)
 
DurationfromSec (double t)
 
bool isZero () const
 
bool operator!= (const Duration &rhs) const
 
Duration operator* (double scale) const
 
Durationoperator*= (double scale)
 
Duration operator+ (const Duration &rhs) const
 
Durationoperator+= (const Duration &rhs)
 
Duration operator- (const Duration &rhs) const
 
Duration operator- () const
 
Durationoperator-= (const Duration &rhs)
 
bool operator< (const Duration &rhs) const
 
bool operator<= (const Duration &rhs) const
 
bool operator== (const Duration &rhs) const
 
bool operator> (const Duration &rhs) const
 
bool operator>= (const Duration &rhs) const
 
int64_t toNSec () const
 
double toSec () const
 
 ~DurationBase ()
 

Additional Inherited Members

- Public Attributes inherited from rs2rosinternal::DurationBase< Duration >
int32_t nsec
 
int32_t sec
 

Detailed Description

Duration representation for use with the Time class.

rs2rosinternal::DurationBase provides most of its functionality.

Definition at line 108 of file duration.h.

Constructor & Destructor Documentation

rs2rosinternal::Duration::Duration ( )
inline

Definition at line 111 of file duration.h.

rs2rosinternal::Duration::Duration ( int32_t  _sec,
int32_t  _nsec 
)
inline

Definition at line 115 of file duration.h.

rs2rosinternal::Duration::Duration ( double  t)
inlineexplicit

Definition at line 119 of file duration.h.

rs2rosinternal::Duration::Duration ( const Rate rate)
explicit

Definition at line 39 of file duration.cpp.

Member Function Documentation

bool rs2rosinternal::Duration::sleep ( ) const

sleep for the amount of time specified by this Duration. If a signal interrupts the sleep, resleeps for the time remaining.

Returns
True if the desired sleep duration was met, false otherwise.

Definition at line 393 of file time.cpp.


The documentation for this class was generated from the following files:


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:41