6#ifndef IFW_CORE_UTILS_TIME_HPP_
7#define IFW_CORE_UTILS_TIME_HPP_
14#include <rad/logger.hpp>
24 void Sleep(
const float sleep_time);
31 struct timespec& time_spec);
35 struct timeval& time_val);
38 std::string
IsoTime(
const double time_since_epoch,
39 const uint8_t prec = 6);
void SecondsToTimeSpec(const double time, struct timespec &time_spec)
Convert time in seconds since epoch to a timespec struct.
Definition time.cpp:26
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:40
void SecondsToTimeVal(const double time, struct timeval &time_val)
Convert time in seconds since epoch to timeval struct.
Definition time.cpp:33
double Time()
Return the time in seconds since epoch.
Definition time.cpp:21
std::string IsoTimeNow(const int8_t prec=6)
Generate ISO8601 timestamp from time of invoking this function.
Definition time.cpp:63
void Sleep(const float sleep_time)
Sleep.
Definition time.cpp:15