ddc
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DDCTimeUnix Struct Reference

#include <ddcTime.h>

Inheritance diagram for DDCTimeUnix:
Inheritance graph
[legend]

Public Member Functions

 DDCTimeUnix ()
 
 DDCTimeUnix (const time_t time_)
 
 DDCTimeUnix (const DDCTimeUnix &X)
 
virtual ~DDCTimeUnix ()
 
void Set ()
 
void Set (const time_t time_)
 
void Set (const DDCTimeUnix &t)
 
time_t Time () const
 
struct tm CalendarTime () const
 
virtual void DateTime (char *DateBuf, char *TimeBuf) const
 
std::string DateStr () const
 
std::string TimeStr () const
 
double Elapsed (const DDCTimeUnix &t0) const
 

Static Public Member Functions

static DDCTimeUnix Now ()
 

Public Attributes

time_t m_t
 

Constructor & Destructor Documentation

◆ DDCTimeUnix() [1/3]

DDCTimeUnix::DDCTimeUnix ( )
inline

default constructor

◆ DDCTimeUnix() [2/3]

DDCTimeUnix::DDCTimeUnix ( const time_t  time_)
inline

default constructor given time_t

References Set().

Here is the call graph for this function:

◆ DDCTimeUnix() [3/3]

DDCTimeUnix::DDCTimeUnix ( const DDCTimeUnix X)
inline

copy constructor

◆ ~DDCTimeUnix()

virtual DDCTimeUnix::~DDCTimeUnix ( )
inlinevirtual

default destructor

Member Function Documentation

◆ Now()

static DDCTimeUnix DDCTimeUnix::Now ( )
inlinestatic

constructor: current time

References Set().

Referenced by ddcLog(), and RmlGetCurrentTime().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Set() [1/3]

void DDCTimeUnix::Set ( )
inline

set this object to current time

Referenced by DDCTimeHiRes::DDCTimeHiRes(), DDCTimeUnix(), Now(), Set(), and DDCTimeHiRes::Set().

Here is the caller graph for this function:

◆ Set() [2/3]

void DDCTimeUnix::Set ( const time_t  time_)
inline

assignment operator (from time_t)

◆ Set() [3/3]

void DDCTimeUnix::Set ( const DDCTimeUnix t)
inline

assignment operator (from DDCTimeUnix object)

References m_t, and Set().

Here is the call graph for this function:

◆ Time()

time_t DDCTimeUnix::Time ( ) const
inline

get low-resultion time_t time

References DateTime(), and m_t.

Here is the call graph for this function:

◆ CalendarTime()

struct tm DDCTimeUnix::CalendarTime ( ) const

get (low-resolution) calendar time; adapted from old RmlGetCurrentTime()

Referenced by RmlGetCurrentTime().

Here is the caller graph for this function:

◆ DateTime()

void DDCTimeUnix::DateTime ( char *  DateBuf,
char *  TimeBuf 
) const
virtual

get time and date strings in ISO-8601 format (YYYY-MM-DD HH:MM:SS) to char* buffers

  • either of DateStr or TimeStr may be passed as NULL
    Parameters
    DateBufoutput buffer of at least DDCDateBufferSize bytes, or NULL
    TimeBufoutput buffer of at least DDCTimeBufferSize bytes, or NULL

Reimplemented in DDCTimeHiRes.

References DDCDateBufferSize, and DDCTimeBufferSize.

Referenced by DateStr(), DDCTimeHiRes::DateTime(), ddcLog(), DDCTimeHiRes::Set(), Time(), and TimeStr().

Here is the caller graph for this function:

◆ DateStr()

std::string DDCTimeUnix::DateStr ( ) const
inline

get date string in ISO-8601 format (YYYY-MM-DD)

References DateTime(), and DDCDateBufferSize.

Here is the call graph for this function:

◆ TimeStr()

std::string DDCTimeUnix::TimeStr ( ) const
inline

get time string in 24-hour HH:MM:SS format

References DateTime(), DDCTimeBufferSize, and Elapsed().

Here is the call graph for this function:

◆ Elapsed()

double DDCTimeUnix::Elapsed ( const DDCTimeUnix t0) const

get elapsed time since t0, double resolution

References m_t.

Referenced by DDCTimeHiRes::Set(), and TimeStr().

Here is the caller graph for this function:

Member Data Documentation

◆ m_t

time_t DDCTimeUnix::m_t

time value (low-resolution: 1 second)

Referenced by DDCTimeHiRes::DDCTimeHiRes(), Elapsed(), Set(), DDCTimeHiRes::Set(), Time(), and DDCTimeAvg::Time().


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