9 #ifndef IFW_CTD_TIME_HPP_
10 #define IFW_CTD_TIME_HPP_
17 #include "rad/logger.hpp"
28 void Sleep(
const float sleep_time);
35 struct timespec& time_spec);
39 struct timeval& time_val);
42 std::string
IsoTime(
const double time_since_epoch,
43 const uint8_t prec = 6);
50 #endif // IFW_CTD_TIME_HPP_
void SecondsToTimeVal(const double time, struct timeval &time_val)
Convert time in seconds since epoch to timeval struct.
Definition: time.cpp:38
std::string IsoTimeNow(const int8_t prec=6)
Generate ISO8601 timestamp from time of invoking this function.
Definition: time.cpp:72
void Sleep(const float sleep_time)
Sleep.
Definition: time.cpp:14
std::string IsoTime(const double time_since_epoch, const uint8_t prec=6)
Generate ISO8601 timestamp from provided time in seconds since epoch.
Definition: time.cpp:47
void SecondsToTimeSpec(const double time, struct timespec &time_spec)
Convert time in seconds since epoch to a timespec struct.
Definition: time.cpp:29
double Time()
Return the time in seconds since epoch.
Definition: time.cpp:22