OKVIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Typedefs | Functions
NsecTimeUtilities.hpp File Reference

Functions to support the use of nanosecond epoch time. More...

#include <chrono>
#include <boost/cstdint.hpp>

Go to the source code of this file.

Namespaces

 okvis
 okvis Main namespace of this package.
 
 okvis::timing
 

Typedefs

typedef boost::int64_t okvis::timing::NsecTime
 Nanoseconds since the epoch. More...
 

Functions

std::chrono::system_clock::time_point okvis::timing::nsecToChrono (const NsecTime &time)
 Convert nanoseconds since the epoch to std::chrono. More...
 
NsecTime okvis::timing::chronoToNsec (const std::chrono::system_clock::time_point &time)
 Convert std::chrono to nanoseconds since the epoch. More...
 
NsecTime okvis::timing::nsecNow ()
 Get the epoch time as nanoseconds since the epoch. More...
 
double okvis::timing::nsecToSec (const NsecTime &time)
 Convert the time (in integer nanoseconds) to decimal seconds. More...
 
NsecTime okvis::timing::secToNsec (const double &time)
 Convert the time (in seconds) to integer nanoseconds. More...
 
constexpr NsecTime okvis::timing::getInvalidTime ()
 return a magic number representing an invalid timestamp More...
 
bool okvis::timing::isValid (const NsecTime &time)
 Is the time valid? This uses a magic number std::numeric_limits<NsecTime>::min() to represent an invalid time. More...
 

Detailed Description

Functions to support the use of nanosecond epoch time.

Author
Paul Furgale paul..nosp@m.furg.nosp@m.ale@g.nosp@m.mail.nosp@m..com
Date
Sat Jul 20 12:39:54 2013