JRTPLIB  3.11.0
Public Member Functions | Static Public Member Functions | List of all members
jrtplib::RTPTime Class Reference

This class is used to specify wallclock time, delay intervals etc. More...

#include <rtptimeutilities.h>

Public Member Functions

 RTPTime (double t)
 Creates an RTPTime instance representing t, which is expressed in units of seconds. More...
 
 RTPTime (RTPNTPTime ntptime)
 Creates an instance that corresponds to ntptime. More...
 
 RTPTime (int64_t seconds, uint32_t microseconds)
 Creates an instance corresponding to seconds and microseconds. More...
 
int64_t GetSeconds () const
 Returns the number of seconds stored in this instance. More...
 
uint32_t GetMicroSeconds () const
 Returns the number of microseconds stored in this instance. More...
 
double GetDouble () const
 Returns the time stored in this instance, expressed in units of seconds. More...
 
RTPNTPTime GetNTPTime () const
 Returns the NTP time corresponding to the time stored in this instance. More...
 

Static Public Member Functions

static RTPTime CurrentTime ()
 Returns an RTPTime instance representing the current wallclock time. More...
 
static void Wait (const RTPTime &delay)
 This function waits the amount of time specified in delay. More...
 

Detailed Description

This class is used to specify wallclock time, delay intervals etc. It stores a number of seconds and a number of microseconds.

Constructor & Destructor Documentation

jrtplib::RTPTime::RTPTime ( double  t)
inline
jrtplib::RTPTime::RTPTime ( RTPNTPTime  ntptime)
inline

Creates an instance that corresponds to ntptime. If the conversion cannot be made, both the seconds and the microseconds are set to zero.

References jrtplib::RTPNTPTime::GetLSW(), and jrtplib::RTPNTPTime::GetMSW().

jrtplib::RTPTime::RTPTime ( int64_t  seconds,
uint32_t  microseconds 
)
inline

Member Function Documentation

RTPTime jrtplib::RTPTime::CurrentTime ( )
inlinestatic

Returns an RTPTime instance representing the current wallclock time. This is expressed as a number of seconds since 00:00:00 UTC, January 1, 1970.

Referenced by GetMicroSeconds().

double jrtplib::RTPTime::GetDouble ( ) const
inline

Referenced by jrtplib::RTPSelect().

uint32_t jrtplib::RTPTime::GetMicroSeconds ( ) const
inline

References CurrentTime(), and Wait().

Referenced by jrtplib::RTPSelect().

RTPNTPTime jrtplib::RTPTime::GetNTPTime ( ) const
inline
int64_t jrtplib::RTPTime::GetSeconds ( ) const
inline

Referenced by jrtplib::RTPSelect().

void jrtplib::RTPTime::Wait ( const RTPTime delay)
inlinestatic

Referenced by GetMicroSeconds().


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