Time Shield Library
C++ library for working with time
|
A collection of utility functions for working with timestamps and time components. More...
Functions | |
const struct timespec | time_shield::get_timespec_impl () noexcept |
Get the current timespec. | |
template<class T = int> | |
const T | time_shield::ns_of_sec () noexcept |
Get the nanosecond part of the current second. | |
template<class T = int> | |
const T | time_shield::us_of_sec () noexcept |
Get the microsecond part of the current second. | |
template<class T = int> | |
const T | time_shield::ms_of_sec () noexcept |
Get the millisecond part of the current second. | |
const ts_t | time_shield::ts () noexcept |
Get the current UTC timestamp in seconds. | |
const ts_t | time_shield::timestamp () noexcept |
Get the current UTC timestamp in seconds. | |
const fts_t | time_shield::fts () noexcept |
Get the current UTC timestamp in floating-point seconds. | |
const fts_t | time_shield::ftimestamp () noexcept |
Get the current UTC timestamp in floating-point seconds. | |
const ts_ms_t | time_shield::ts_ms () noexcept |
Get the current UTC timestamp in milliseconds. | |
const ts_ms_t | time_shield::timestamp_ms () noexcept |
Get the current UTC timestamp in milliseconds. | |
const ts_ms_t | time_shield::now () noexcept |
Get the current UTC timestamp in milliseconds. | |
const ts_us_t | time_shield::ts_us () noexcept |
Get the current UTC timestamp in microseconds. | |
const ts_us_t | time_shield::timestamp_us () noexcept |
Get the current UTC timestamp in microseconds. | |
A collection of utility functions for working with timestamps and time components.
This module provides functions for obtaining the current timestamps in various formats (e.g., seconds, milliseconds, microseconds, floating-point seconds) and extracting sub-second components such as nanoseconds, microseconds, and milliseconds.
|
inlinenoexcept |
Get the current UTC timestamp in floating-point seconds.
Definition at line 107 of file time_utils.hpp.
|
inlinenoexcept |
Get the current UTC timestamp in floating-point seconds.
Definition at line 100 of file time_utils.hpp.
|
inlinenoexcept |
Get the current timespec.
Definition at line 46 of file time_utils.hpp.
|
noexcept |
Get the millisecond part of the current second.
T | Type of the returned value (default is int). |
Definition at line 79 of file time_utils.hpp.
|
inlinenoexcept |
Get the current UTC timestamp in milliseconds.
Definition at line 128 of file time_utils.hpp.
|
inlinenoexcept |
Get the nanosecond part of the current second.
T | Type of the returned value (default is int). |
Definition at line 61 of file time_utils.hpp.
|
inlinenoexcept |
Get the current UTC timestamp in seconds.
Definition at line 93 of file time_utils.hpp.
|
inlinenoexcept |
Get the current UTC timestamp in milliseconds.
Definition at line 121 of file time_utils.hpp.
|
inlinenoexcept |
Get the current UTC timestamp in microseconds.
Definition at line 142 of file time_utils.hpp.
|
inlinenoexcept |
Get the current UTC timestamp in seconds.
Definition at line 86 of file time_utils.hpp.
|
inlinenoexcept |
Get the current UTC timestamp in milliseconds.
Definition at line 114 of file time_utils.hpp.
|
inlinenoexcept |
Get the current UTC timestamp in microseconds.
Definition at line 135 of file time_utils.hpp.
|
noexcept |
Get the microsecond part of the current second.
T | Type of the returned value (default is int). |
Definition at line 70 of file time_utils.hpp.