roo_time
API Documentation for roo_time
Loading...
Searching...
No Matches
roo_time::WallTime Class Reference

Represents absolute wall time since Unix epoch. More...

#include <roo_time.h>

Public Member Functions

 WallTime ()
 Constructs epoch wall time.
 
 WallTime (Duration since_epoch)
 Constructs wall time from offset since Unix epoch.
 
Duration sinceEpoch () const
 Returns elapsed duration since Unix epoch.
 
WallTimeoperator+= (const Duration &i)
 Adds duration to this wall time.
 
WallTimeoperator-= (const Duration &i)
 Subtracts duration from this wall time.
 

Friends

WallTime operator+ (const WallTime &, const Duration &)
 Returns wall time shifted by duration.
 
WallTime operator- (const WallTime &, const Duration &)
 Returns wall time shifted backwards by duration.
 
WallTime operator+ (const Duration &, const WallTime &)
 Returns wall time shifted by duration.
 

Detailed Description

Represents absolute wall time since Unix epoch.

Stored with microsecond precision and 64-bit range. Does not account for leap seconds.

Definition at line 581 of file roo_time.h.

Constructor & Destructor Documentation

◆ WallTime() [1/2]

roo_time::WallTime::WallTime ( )
inline

Constructs epoch wall time.

Definition at line 584 of file roo_time.h.

◆ WallTime() [2/2]

roo_time::WallTime::WallTime ( Duration  since_epoch)
inlineexplicit

Constructs wall time from offset since Unix epoch.

Definition at line 587 of file roo_time.h.

Member Function Documentation

◆ operator+=()

WallTime & roo_time::WallTime::operator+= ( const Duration i)
inline

Adds duration to this wall time.

Definition at line 593 of file roo_time.h.

◆ operator-=()

WallTime & roo_time::WallTime::operator-= ( const Duration i)
inline

Subtracts duration from this wall time.

Definition at line 599 of file roo_time.h.

◆ sinceEpoch()

Duration roo_time::WallTime::sinceEpoch ( ) const
inline

Friends And Related Symbol Documentation

◆ operator+ [1/2]

WallTime operator+ ( const Duration i,
const WallTime t 
)
friend

Returns wall time shifted by duration.

Definition at line 658 of file roo_time.h.

◆ operator+ [2/2]

WallTime operator+ ( const WallTime t,
const Duration i 
)
friend

Returns wall time shifted by duration.

Definition at line 648 of file roo_time.h.

◆ operator-

WallTime operator- ( const WallTime t,
const Duration i 
)
friend

Returns wall time shifted backwards by duration.

Definition at line 653 of file roo_time.h.


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