Absolute time represented with milliseconds since epoch.
More...
#include <Time.h>
Absolute time represented with milliseconds since epoch.
◆ Absolute()
SC::Time::Absolute::Absolute |
( |
int64_t |
millisecondsSinceEpoch | ) |
|
|
inline |
Construct an Absolute from milliseconds since epoch.
- Parameters
-
millisecondsSinceEpoch | Number of milliseconds since epoch |
◆ getMillisecondsSinceEpoch()
int64_t SC::Time::Absolute::getMillisecondsSinceEpoch |
( |
| ) |
const |
|
inline |
Return given time as milliseconds since epoch.
- Returns
- Time in milliseconds since epoch
◆ now()
static Absolute SC::Time::Absolute::now |
( |
| ) |
|
|
static |
Obtain Absolute representing current time.
- Returns
- An Absolute representing current time
◆ parseLocal()
bool SC::Time::Absolute::parseLocal |
( |
ParseResult & |
result | ) |
const |
Parses local time to a Parsed structure.
- Parameters
-
[out] | result | The Parsed structure holding current date / time |
- Returns
true
if time has been parsed successfully
Example: Time::Absolute::ParseResult local;
report.console.print("{} {:02}/{:02}/{} {:02}:{:02}:{:02} {}", local.getDay(), local.dayOfMonth, local.getMonth(),
local.year, local.hour, local.minutes, local.seconds,
local.isDaylightSaving ? "DAYLIGHT SAVING" : "NO DAYLIGHT SAVING");
#define SC_TEST_EXPECT(e)
Records a test expectation (eventually aborting or breaking o n failed test)
Definition: Testing.h:113
static Absolute now()
Obtain Absolute representing current time.
bool parseLocal(ParseResult &result) const
Parses local time to a Parsed structure.
◆ parseUTC()
bool SC::Time::Absolute::parseUTC |
( |
ParseResult & |
result | ) |
const |
Parses UTC time to a Parsed structure.
- Parameters
-
[out] | result | The Parsed structure holding current date / time |
- Returns
true
if time has been parsed successfully
◆ subtract()
The documentation for this struct was generated from the following file: