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

Represents a realtime clock in milliseconds since epoch (use Realtime::now for current time) More...

#include <Time.h>

Inheritance diagram for SC::Time::Realtime:
SC::Time::Absolute

Public Member Functions

int64_t getMillisecondsSinceEpoch () const
 Return given time as milliseconds since epoch. 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 Realtime now ()
 Obtain time according to realtime clock. More...
 

Additional Inherited Members

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

Detailed Description

Represents a realtime clock in milliseconds since epoch (use Realtime::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

◆ getMillisecondsSinceEpoch()

int64_t SC::Time::Realtime::getMillisecondsSinceEpoch ( ) const
inline

Return given time as milliseconds since epoch.

◆ now()

static Realtime SC::Time::Realtime::now ( )
static

Obtain time according to realtime clock.


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