log4tango  5.0.2
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
log4tango::TimeStamp Class Reference

#include <TimeStamp.hh>

Public Member Functions

 TimeStamp ()
 Constructs a TimeStamp representing 'now'. More...
 
 TimeStamp (const TimeStamp &t)
 Copy Constructor. More...
 
 TimeStamp (unsigned int seconds, unsigned int microseconds=0)
 Constructs a TimeStamp representing the given offset since the epoch ( 00:00:00 1970/1/1 UTC). More...
 
int get_seconds (void) const
 Returns the 'seconds' part of the TimeStamp. More...
 
int get_milliseconds (void) const
 Returns the 'subseconds' part of the TimeStamp in milliseconds, get_milliseconds() == get_microseconds() / 1000. More...
 
int get_microseconds (void) const
 Returns the subsecond part of the TimeStamp in microseconds. More...
 
void operator= (const TimeStamp &t)
 Operator=. More...
 

Static Public Member Functions

static const TimeStampget_start_time (void)
 Returns a TimeStamp representing the time at which the application started. More...
 

Protected Attributes

int _seconds
 
int _micro_seconds
 

Static Protected Attributes

static TimeStamp _start_stamp
 

Constructor & Destructor Documentation

◆ TimeStamp() [1/3]

log4tango::TimeStamp::TimeStamp ( )

Constructs a TimeStamp representing 'now'.

◆ TimeStamp() [2/3]

log4tango::TimeStamp::TimeStamp ( const TimeStamp t)
inline

Copy Constructor.

◆ TimeStamp() [3/3]

log4tango::TimeStamp::TimeStamp ( unsigned int  seconds,
unsigned int  microseconds = 0 
)
inline

Constructs a TimeStamp representing the given offset since the epoch ( 00:00:00 1970/1/1 UTC).

Member Function Documentation

◆ get_microseconds()

int log4tango::TimeStamp::get_microseconds ( void  ) const
inline

Returns the subsecond part of the TimeStamp in microseconds.

The actual precision of this value depends on the platform and may be in the order of milliseconds rather than microseconds.

◆ get_milliseconds()

int log4tango::TimeStamp::get_milliseconds ( void  ) const
inline

Returns the 'subseconds' part of the TimeStamp in milliseconds, get_milliseconds() == get_microseconds() / 1000.

◆ get_seconds()

int log4tango::TimeStamp::get_seconds ( void  ) const
inline

Returns the 'seconds' part of the TimeStamp.

◆ get_start_time()

static const TimeStamp& log4tango::TimeStamp::get_start_time ( void  )
inlinestatic

Returns a TimeStamp representing the time at which the application started.

◆ operator=()

void log4tango::TimeStamp::operator= ( const TimeStamp t)
inline

Operator=.

Member Data Documentation

◆ _micro_seconds

int log4tango::TimeStamp::_micro_seconds
protected

◆ _seconds

int log4tango::TimeStamp::_seconds
protected

◆ _start_stamp

TimeStamp log4tango::TimeStamp::_start_stamp
staticprotected

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