struct
#include <types.h>
time Represents a local time.
Contents
Constructors, destructors, conversion operators
Public functions
- auto ToString() const -> std::string
- Returns "HH:MM:SS.sssssssss".
- auto IsValid() const -> bool
- Returns true if this is a valid time between 00:00 and 23:59:59.999999999.
- auto operator==(const time& other) const -> bool
- auto operator!=(const time& other) const -> bool
- auto operator<(const time& other) const -> bool
- auto operator<=(const time& other) const -> bool
- auto operator>(const time& other) const -> bool
- auto operator>=(const time& other) const -> bool
Public variables
- uint32_t hour
- The hour, from 0-23.
- uint32_t minute
- The minute, from 0-59.
- uint32_t second
- The second, from 0-59.
- uint32_t nanosecond
- The nanoseconds, from 0-999999999.
Friends
- auto operator<<(std::ostream& os, const time& t) -> std::ostream&
- Overloaded stream operator.
Function documentation
werkzeugkiste:: config:: time:: time(std::string_view str) explicit
Parses a string representation.
Supported formats are:
- HH:MM
- HH:MM:SS
- HH:MM:SS.sss (for milliseconds)
- HH:MM:SS.ssssss (for microseconds)
- HH:MM:SS.sssssssss (for nanoseconds)