45 TimeVal (
long sec_,
long msec_);
61 operator double ()
const;
64 void sec (
long sec_) { tv_sec = sec_; }
67 long sec (
void)
const {
return tv_sec; }
70 void msec (
long msec_) { tv_usec = msec_; }
73 long msec (
void)
const {
return tv_usec; }
128 string fmtString (
const char* fmt_ = NULL)
const;
167 void init (
long,
long,
int);
186 init (
long s_,
long ms_,
int tz_)
215 tv_usec = (long) ((d_ -
double(l))*1000000.0);
223 init (tv_.tv_sec, tv_.tv_usec,
gmt);
230 init (tv_.tv_sec, tv_.tv_usec, tv_.
m_tz);
234 TimeVal::operator double ()
const
236 return tv_sec + tv_usec / 1000000.0;
243 return (
msec () % 1000000) / 1000;
268 init (tv_.tv_sec, tv_.tv_usec, tv_.
m_tz);
294 return (tv_sec < rhs_.tv_sec
295 || (tv_sec == rhs_.tv_sec && tv_usec < rhs_.tv_usec) ) ;
302 return !(*
this < rhs_ || rhs_ < *
this);
314 return !( lhs_ == rhs_ );
320 return !(rhs_ < lhs_);
326 return !(lhs_ < rhs_);