26 void SetTimeOutSec(
int sec);
28 bool Expired(
const Time_Clock &tm,
bool reset =
false);
29 bool Expired(
bool reset =
false);
39 bool operator() (
bool reset=
false)
41 return Expired(reset);
43 bool operator() (
const Time_Clock &tm,
bool reset =
false)
45 return Expired(tm, reset);
53 Time_Span Duration()
const {
return _duration; };
57 _alarm_time += _duration;
58 if(_alarm_time <=curtime)
59 _alarm_time = curtime+_duration;
71 _alarm_time = tm + _duration;
76 inline void Time_Out::SetTimeOutSec(
int sec)
78 _duration.Set(0, 0, 0, sec, 0);
84 inline void Time_Out::ReStart()
91 inline void Time_Out::ResetTime(
const Time_Clock & tm)
93 _alarm_time = tm + _duration;
99 inline bool Time_Out::Expired(
const Time_Clock &tm,
bool reset)
101 bool answer = (_alarm_time <= tm) ;
109 inline bool Time_Out::Expired(
bool reset)
118 return _alarm_time - tm;
123 inline Time_Span Time_Out::Remaining()
const 128 #endif //__TIME_OUT_H__
This class is to provide a consistant interface and storage to clock time
void ToCurrentTime()
Load this object with the current OS time.
static Time_Clock GetCurrentTime()
The Default no param constructor.