43 if (::clock_gettime(clkid, &
fTime) != 0) {
44 throw Rexception(
"Rtime::GetClock()",
"clock_gettime() failed: ", errno);
54 if (nsec < 0 || nsec > 999999999)
55 throw Rexception(
"Rtime::SetNSec()",
"bad args: <0 or >999999999 ");
76 return double(now - *
this);
84 if (
fTime.tv_sec < 365*24*3600) {
88 ::localtime_r(&
fTime.tv_sec, &tymd);
89 os <<
RosPrintf(tymd.tm_year+1900,
"d",4) <<
"-"
103void Rtime::Dump(std::ostream& os,
int ind,
const char* text)
const
106 os << bl << (text?text:
"--") <<
"Rtime @ " <<
this << endl;
I/O appicator to generate fill characters.
bool IsZero() const
FIXME_docs.
std::string ToString() const
FIXME_docs.
void Print(std::ostream &os) const
FIXME_docs.
void SetNSec(long nsec)
FIXME_docs.
void Dump(std::ostream &os, int ind=0, const char *text=0) const
FIXME_docs.
struct timespec fTime
time
void GetClock(clockid_t clkid)
FIXME_docs.
double ToDouble() const
FIXME_docs.
double Age(clockid_t clkid) const
FIXME_docs.
RosPrintfS< bool > RosPrintf(bool value, const char *form=0, int width=0, int prec=0)
Creates a print object for the formatted output of a bool value.
Declaration of class ReventLoop.