Functions | |
template<typename TimeUnit = std::chrono::seconds> | |
std::chrono::duration< TimeUnit > | time_t2Duration (const time_t time) |
Converts a time_t to a duration. | |
template<typename TimeUnit > | |
time_t | duration2Time_t (const std::chrono::duration< TimeUnit > &duration) |
Converts a duration to a time_t. | |
template<typename TimeUnit = std::chrono::nanoseconds, typename Rep = typename TimeUnit::rep, typename Period = typename TimeUnit::period> | |
std::chrono::duration< Rep, Period > | timespec2Duration (const timespec &ts) |
Converts a timespec to a duration. | |
template<typename Rep , typename Period > | |
struct timespec | duration2Timespec (const std::chrono::duration< Rep, Period > &dur) |
Converts a duration to a timespec. | |
template<typename TimeUnit = std::chrono::microseconds> | |
std::chrono::duration< TimeUnit > | timeval2Duration (const timeval &tv) |
Converts a timeval to a duration. | |
template<typename TimeUnit > | |
struct timeval | duration2Timeval (const std::chrono::duration< TimeUnit > &dur) |
Converts a duration to a timeval. | |
template<typename Duration = std::chrono::seconds> | |
std::chrono::time_point< std::chrono::system_clock, Duration > | time_t2TimePoint (const time_t time) |
Converts a time_t to a time_point. | |
template<typename Duration > | |
time_t | time_point2Time_t (const std::chrono::time_point< std::chrono::system_clock, Duration > &tp) |
Converts a time_point to a time_t. | |
template<typename Duration = std::chrono::nanoseconds> | |
std::chrono::time_point< std::chrono::system_clock, Duration > | timespec2TimePoint (const timespec &ts) |
Converts a timespec to a time_point. | |
template<typename Duration = std::chrono::microseconds> | |
std::chrono::time_point< std::chrono::system_clock, Duration > | timeval2TimePoint (const timeval &tv) |
Converts a timeval to a time_point. | |
template<typename Duration > | |
timespec | time_point2Timespec (const std::chrono::time_point< std::chrono::system_clock, Duration > &tp) |
Converts a time_point to a timespec. | |
template<typename Duration > | |
timeval | time_point2Timeval (const std::chrono::time_point< std::chrono::system_clock, Duration > &tp) |
Converts a time_point to a timeval. | |
template<typename Duration > | |
std::string | time_point2String (const std::chrono::time_point< std::chrono::system_clock, Duration > &tp, const std::string &format=DATEFORMAT) |
Converts a time_point to a string. | |
template<typename TimeUnit > | |
std::string | duration2String (const std::chrono::duration< TimeUnit > &duration, const std::string &format=DATEFORMAT) |
Converts a duration to a string. | |
template<typename Duration = std::chrono::seconds> | |
std::chrono::time_point< std::chrono::system_clock, Duration > | string2time_point (const std::string &timeString, const std::string &timeStringFormat=DATEFORMAT) |
Converts a string to a time_point. | |
int32_t | delay_periodic (int32_t delay_us) |
Delays execution periodically. | |
int32_t SystemTools::Time::delay_periodic | ( | int32_t | delay_us | ) |
Delays execution periodically.
delay_us | The delay in microseconds. |
std::string SystemTools::Time::duration2String | ( | const std::chrono::duration< TimeUnit > & | duration, |
const std::string & | format = DATEFORMAT |
||
) |
Converts a duration to a string.
TimeUnit | The unit of time for the duration. |
duration | The duration to convert. |
format | The format string for the output. |
Definition at line 331 of file TimeTools.hxx.
References duration2Time_t().
time_t SystemTools::Time::duration2Time_t | ( | const std::chrono::duration< TimeUnit > & | duration | ) |
Converts a duration to a time_t.
TimeUnit | The unit of time for the duration. |
duration | The duration to convert. |
Definition at line 78 of file TimeTools.hxx.
Referenced by duration2String().
struct timespec SystemTools::Time::duration2Timespec | ( | const std::chrono::duration< Rep, Period > & | dur | ) |
Converts a duration to a timespec.
Rep | The representation type for the duration. |
Period | The period type for the duration. |
dur | The duration to convert. |
Definition at line 103 of file TimeTools.hxx.
struct timeval SystemTools::Time::duration2Timeval | ( | const std::chrono::duration< TimeUnit > & | dur | ) |
Converts a duration to a timeval.
TimeUnit | The unit of time for the duration. |
dur | The duration to convert. |
Definition at line 133 of file TimeTools.hxx.
std::chrono::time_point< std::chrono::system_clock, Duration > SystemTools::Time::string2time_point | ( | const std::string & | timeString, |
const std::string & | timeStringFormat = DATEFORMAT |
||
) |
Converts a string to a time_point.
Duration | The duration type for the time_point. |
timeString | The string to convert. |
timeStringFormat | The format of the input string. |
Definition at line 414 of file TimeTools.hxx.
std::string SystemTools::Time::time_point2String | ( | const std::chrono::time_point< std::chrono::system_clock, Duration > & | tp, |
const std::string & | format = DATEFORMAT |
||
) |
Converts a time_point to a string.
Duration | The duration type for the time_point. |
tp | The time_point to convert. |
format | The format string for the output. |
Definition at line 317 of file TimeTools.hxx.
time_t SystemTools::Time::time_point2Time_t | ( | const std::chrono::time_point< std::chrono::system_clock, Duration > & | tp | ) |
Converts a time_point to a time_t.
Duration | The duration type for the time_point. |
tp | The time_point to convert. |
Definition at line 162 of file TimeTools.hxx.
timespec SystemTools::Time::time_point2Timespec | ( | const std::chrono::time_point< std::chrono::system_clock, Duration > & | tp | ) |
Converts a time_point to a timespec.
Duration | The duration type for the time_point. |
tp | The time_point to convert. |
Definition at line 198 of file TimeTools.hxx.
timeval SystemTools::Time::time_point2Timeval | ( | const std::chrono::time_point< std::chrono::system_clock, Duration > & | tp | ) |
Converts a time_point to a timeval.
Duration | The duration type for the time_point. |
tp | The time_point to convert. |
Definition at line 215 of file TimeTools.hxx.
std::chrono::duration< TimeUnit > SystemTools::Time::time_t2Duration | ( | const time_t | time | ) |
Converts a time_t to a duration.
TimeUnit | The unit of time for the duration. |
time | The time_t value to convert. |
Definition at line 67 of file TimeTools.hxx.
std::chrono::time_point< std::chrono::system_clock, Duration > SystemTools::Time::time_t2TimePoint | ( | const time_t | time | ) |
Converts a time_t to a time_point.
Duration | The duration type for the time_point. |
time | The time_t value to convert. |
Definition at line 151 of file TimeTools.hxx.
std::chrono::duration< Rep, Period > SystemTools::Time::timespec2Duration | ( | const timespec & | ts | ) |
Converts a timespec to a duration.
TimeUnit | The unit of time for the duration. |
ts | The timespec to convert. |
Definition at line 90 of file TimeTools.hxx.
std::chrono::time_point< std::chrono::system_clock, Duration > SystemTools::Time::timespec2TimePoint | ( | const timespec & | ts | ) |
Converts a timespec to a time_point.
Duration | The duration type for the time_point. |
ts | The timespec to convert. |
Definition at line 174 of file TimeTools.hxx.
std::chrono::duration< TimeUnit > SystemTools::Time::timeval2Duration | ( | const timeval & | tv | ) |
Converts a timeval to a duration.
TimeUnit | The unit of time for the duration. |
tv | The timeval to convert. |
Definition at line 121 of file TimeTools.hxx.
std::chrono::time_point< std::chrono::system_clock, Duration > SystemTools::Time::timeval2TimePoint | ( | const timeval & | tv | ) |
Converts a timeval to a time_point.
Duration | The duration type for the time_point. |
tv | The timeval to convert. |
Definition at line 186 of file TimeTools.hxx.