|
libcosmos
Linux C++ System Programming Library
|
A C++ wrapper around the POSIX struct timespec coupled to a specific CLOCK type. More...
#include <types.hxx>
Inheritance diagram for cosmos::TimeSpec< CLOCK >:Public Member Functions | |
| TimeSpec (time_t seconds, long nano_seconds=0) | |
| TimeSpec (const std::chrono::milliseconds ms) | |
| TimeSpec (const std::chrono::nanoseconds ns) | |
| TimeSpec (const no_init_t) | |
| Deliberately don't initialize the members for performance reasons. | |
| bool | isZero () const |
| void | reset () |
| time_t | getSeconds () const |
| long | getNanoseconds () const |
| void | setSeconds (const time_t seconds) |
| void | setNanoseconds (const long nano_seconds) |
| void | addSeconds (const time_t seconds) |
| void | addNanoseconds (const long nano_seconds) |
| TimeSpec & | setAsMilliseconds (const size_t milliseconds) |
| TimeSpec & | set (const std::chrono::milliseconds ms) |
| TimeSpec & | set (const std::chrono::nanoseconds ns) |
| size_t | toMilliseconds () const |
| Converts the time representation into a single milliseconds value. | |
| operator std::chrono::milliseconds () const | |
| bool | operator< (const TimeSpec &other) const |
| bool | operator>= (const TimeSpec &other) const |
| bool | operator== (const TimeSpec &other) const |
| bool | operator!= (const TimeSpec &other) const |
| bool | operator<= (const TimeSpec &other) const |
| TimeSpec | operator- (const TimeSpec &other) const |
| TimeSpec | operator+ (const TimeSpec &other) const |
Static Protected Attributes | |
| static constexpr long | NANOSECOND_BASE {1000 * 1000 * 1000} |
A C++ wrapper around the POSIX struct timespec coupled to a specific CLOCK type.
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
Definition at line 122 of file types.hxx.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexprprotected |