Sane C++ Libraries
C++ Platform Abstraction Libraries
SC::Time::Monotonic Struct Reference

Represent monotonically increasing time (use Monotonic::now for current time) More...

#include <Time.h>

Inheritance diagram for SC::Time::Monotonic:
SC::Time::Absolute

Public Member Functions

int64_t getMonotonicMilliseconds () const
 Return given time as monotonically incrementing milliseconds. More...
 
 Absolute ()
 Construct an Absolute time equal to epoch. More...
 
 Absolute (int64_t milliseconds)
 Construct an Absolute from milliseconds since epoch. More...
 
- Public Member Functions inherited from SC::Time::Absolute
 Absolute ()
 Construct an Absolute time equal to epoch. More...
 
 Absolute (int64_t milliseconds)
 Construct an Absolute from milliseconds since epoch. More...
 
bool parseLocal (ParseResult &result) const
 Parses local time to a Parsed structure. More...
 
bool parseUTC (ParseResult &result) const
 Parses UTC time to a Parsed structure. More...
 
bool isLaterThanOrEqualTo (Absolute other) const
 Check if this Absolute time is later or equal to another Absolute time. More...
 
bool isLaterThan (Absolute other) const
 Check if this Absolute time is lather than another Absolute time. More...
 
Milliseconds subtractExact (Absolute other) const
 Obtains the difference between this time and the other time. More...
 
Absolute offsetBy (Milliseconds other) const
 Offset this absolute time with a relative time in milliseconds. More...
 

Static Public Member Functions

static Monotonic now ()
 Obtain time according to monotonic clock. More...
 

Additional Inherited Members

- Protected Attributes inherited from SC::Time::Absolute
int64_t milliseconds
 

Detailed Description

Represent monotonically increasing time (use Monotonic::now for current time)

Member Function Documentation

◆ Absolute() [1/2]

SC::Time::Absolute::Absolute ( )
inline

Construct an Absolute time equal to epoch.

◆ Absolute() [2/2]

SC::Time::Absolute::Absolute ( int64_t  milliseconds)
inline

Construct an Absolute from milliseconds since epoch.

Parameters
millisecondsNumber of milliseconds since epoch

◆ getMonotonicMilliseconds()

int64_t SC::Time::Monotonic::getMonotonicMilliseconds ( ) const
inline

Return given time as monotonically incrementing milliseconds.

◆ now()

static Monotonic SC::Time::Monotonic::now ( )
static

Obtain time according to monotonic clock.


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