42 #ifndef INCLUDE_OKVIS_TIMING_NSECTIMEUTILITIES_HPP_
43 #define INCLUDE_OKVIS_TIMING_NSECTIMEUTILITIES_HPP_
45 #include <boost/cstdint.hpp>
NsecTime chronoToNsec(const std::chrono::system_clock::time_point &time)
Convert std::chrono to nanoseconds since the epoch.
Definition: NsecTimeUtilities.cpp:48
NsecTime secToNsec(const double &time)
Convert the time (in seconds) to integer nanoseconds.
Definition: NsecTimeUtilities.cpp:67
constexpr NsecTime getInvalidTime()
return a magic number representing an invalid timestamp
Definition: NsecTimeUtilities.cpp:71
std::chrono::system_clock::time_point nsecToChrono(const NsecTime &time)
Convert nanoseconds since the epoch to std::chrono.
Definition: NsecTimeUtilities.cpp:40
boost::int64_t NsecTime
Nanoseconds since the epoch.
Definition: NsecTimeUtilities.hpp:51
NsecTime nsecNow()
Get the epoch time as nanoseconds since the epoch.
Definition: NsecTimeUtilities.cpp:54
bool isValid(const NsecTime &time)
Is the time valid? This uses a magic number std::numeric_limits<NsecTime>::min() to represent an inva...
Definition: NsecTimeUtilities.cpp:75
double nsecToSec(const NsecTime &time)
Convert the time (in integer nanoseconds) to decimal seconds.
Definition: NsecTimeUtilities.cpp:61