appkit  1.5.1
RoadNarrows Robotics Application Kit
Time.h File Reference

Time functions and class interfaces. More...

#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include <iostream>
#include "rnr/rnrconfig.h"
#include "rnr/log.h"

Go to the source code of this file.

Classes

class  rnr::chronos::Time
 Time class. More...
 

Namespaces

 rnr
 RoadNarrows Robotics.
 
 rnr::chronos
 Chronos - God of Time.
 

Functions

std::ostream & operator<< (std::ostream &os, const timespec &obj)
 A timespec insertion operator. More...
 
timespec rnr::chronos::now ()
 Get the current time, indentified by CLOCK_REALTIME, since the last Epoch. More...
 
int rnr::chronos::now (timespec &ts)
 Get the current time, indentified by CLOCK_REALTIME, since the last Epoch. More...
 
double rnr::chronos::toFp (const timespec &ts)
 Convert timespec to floating point number equivalent. More...
 
timespec rnr::chronos::toTs (const double &t)
 Convert floating point seconds to timespec equivalent. More...
 
bool rnr::chronos::isSet (const timespec &a)
 Check if timespec is set. More...
 
void rnr::chronos::clear (timespec &ts)
 Clear this object's time. More...
 
timespec rnr::chronos::add (const timespec &a, const timespec &b)
 Add two timespecs. More...
 
timespec rnr::chronos::operator+ (const timespec &a, const timespec &b)
 a + b More...
 
timespec rnr::chronos::sub (const timespec &a, const timespec &b)
 Subtract two timespecs. More...
 
timespec rnr::chronos::operator- (const timespec &a, const timespec &b)
 a - b More...
 
timespec rnr::chronos::normalize (const timespec &a)
 Normalize the timespec. More...
 
std::ostream & rnr::chronos::operator<< (std::ostream &os, const Time &obj)
 Time insertion operator. More...
 

Variables

const long rnr::chronos::MILLION = 1000000
 1,000,000
 
const long long rnr::chronos::BILLION = 1000000000
 1,000,000,000
 

Detailed Description

Time functions and class interfaces.

Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
Copyright
© 2015-2017. RoadNarrows LLC.
http://www.roadnarrows.com
All Rights Reserved

Definition in file Time.h.

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const timespec &  obj 
)