Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
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 SC::TimeMs

Public Member Functions

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

Static Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from SC::TimeMs
int64_t milliseconds = 0
 

Detailed Description

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

Member Function Documentation

◆ Absolute() [1/2]

SC::Time::Absolute::Absolute ( )
default

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
inlinenodiscard

Return given time as monotonically incrementing milliseconds.

◆ now()

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

Obtain time according to monotonic clock.


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