167 void init (
long,
long,
int);
243 return (
msec () % 1000000) / 1000;
302 return !(*
this <
rhs_ ||
rhs_ < *
this);
A wrapper class to provide AutoPtr with reference semantics.
void tz(int tz_)
Set timezone.
static TimeVal m_zero
Zero time value.
string fmtString(const char *fmt_=NULL) const
Format timeval structure into readable format.
string fmt_mm_ss() const
Format timeval structure in readable format MM:SS.
void normalize()
Normalization after arithmetic operation.
int tz(void) const
Get timezone.
TimeVal & operator=(const TimeVal &tv_)
string fmt_ss_mls() const
Format timeval structure in readable format SS.MLS.
static TimeVal zeroTime()
Static that returns zero timeval: {0,0}.
friend TimeVal operator+(const TimeVal &lhs_, const TimeVal &rhs_)
Addition.
friend bool operator>=(const TimeVal &lhs_, const TimeVal &rhs_)
Comparison.
friend bool operator>(const TimeVal &lhs_, const TimeVal &rhs_)
Comparison.
friend bool operator<=(const TimeVal &lhs_, const TimeVal &rhs_)
Comparison.
string fmt_mm_ss_mls() const
Format timeval structure in readable format MM:SS.MLS.
friend bool operator!=(const TimeVal &lhs_, const TimeVal &rhs_)
Comparison.
string fmt_hh_mm_ss() const
Format timeval structure in readable format HH:MM:SS.
long msec(void) const
Get microseconds.
TimeVal & operator+=(const TimeVal &rhs_)
Addition.
long millisec() const
Convert tv_usec's microseconds (=1/1,000,000 sec) to milliseconds (=1/1,000 sec).
friend TimeVal operator-(const TimeVal &lhs_, const TimeVal &rhs_)
Substraction.
void init(long, long, int)
Internal initialization common to most constructors.
void dump_to_log(const string &name_="") const
Dump value of struct timeval to the log file with mask TRACE = DBG_APP15.
void sec(long sec_)
Set seconds.
bool operator<(const TimeVal &rhs_) const
Comparison.
TimeVal()
Default constructor.
static TimeVal gettimeofday()
Shields off underlying OS differences in getting current time.
long sec(void) const
Get secons.
TimeVal & operator-=(const TimeVal &rhs_)
Substraction.
bool operator==(const TimeVal &rhs_) const
Equality.
void msec(long msec_)
Set microseconds.
string fmt_hh_mm_ss_mls() const
Format timeval structure in readable format HH:MM:SS.MLS.
bool operator!=(const TimeVal &lhs_, const TimeVal &rhs_)
bool operator>=(const TimeVal &lhs_, const TimeVal &rhs_)
TimeVal operator+(const TimeVal &lhs_, const TimeVal &rhs_)
bool operator>(const TimeVal &lhs_, const TimeVal &rhs_)
TimeVal operator-(const TimeVal &lhs_, const TimeVal &rhs_)
bool operator<=(const TimeVal &lhs_, const TimeVal &rhs_)