log4shib 2.0.0

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

A simple TimeStamp abstraction. More...

`#include <TimeStamp.hh>`

Collaboration diagram for log4shib::TimeStamp:
[legend]

## Public Member Functions
| TimeStamp ()
| Constructs a TimeStamp representing 'now'. 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 | getSeconds () const
| Returns the 'seconds' part of the TimeStamp. More...
int | getMilliSeconds () const
| Returns the 'subseconds' part of the TimeStamp in milliseconds, getMilliSeconds() == getMicroSeconds() / 1000. More...
int | getMicroSeconds () const
| Returns the subsecond part of the TimeStamp in microseconds. More...

## Static Public Member Functions
static const TimeStamp & | getStartTime ()
| Returns a TimeStamp representing the time at which the application started. More...

## Protected Attributes
int | _seconds
int | _microSeconds

## Static Protected Attributes
static TimeStamp | _startStamp

## Detailed Description

A simple TimeStamp abstraction.

## Constructor & Destructor Documentation

## ◆ TimeStamp() [1/2]

log4shib::TimeStamp::TimeStamp | ( |  | ) |

Constructs a TimeStamp representing 'now'.

## ◆ TimeStamp() [2/2]

log4shib::TimeStamp::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).

## Member Function Documentation

## ◆ getMicroSeconds()

int log4shib::TimeStamp::getMicroSeconds | ( |  | ) | 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.

## ◆ getMilliSeconds()

int log4shib::TimeStamp::getMilliSeconds | ( |  | ) | const
| inline

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

## ◆ getSeconds()

int log4shib::TimeStamp::getSeconds | ( |  | ) | const
| inline

Returns the 'seconds' part of the TimeStamp.

## ◆ getStartTime()

static const TimeStamp & log4shib::TimeStamp::getStartTime | ( |  | ) |
| inline static

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

## Member Data Documentation

## ◆ _microSeconds

int log4shib::TimeStamp::_microSeconds
| protected

## ◆ _seconds

int log4shib::TimeStamp::_seconds
| protected

## ◆ _startStamp

TimeStamp log4shib::TimeStamp::_startStamp
| static protected

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

- TimeStamp.hh
- TimeStamp.cpp