libassa
3.5.0
|
#include <TimerCountdown.h>
Public Member Functions | |
TimerCountdown (TimeVal *wait_time_) | |
Constructor. | |
~TimerCountdown () | |
Destructor. | |
Private Attributes | |
TimeVal * | m_maxWaitTime |
Maximum time to wait. | |
TimeVal | m_start |
Time when countdown started. |
Definition at line 28 of file TimerCountdown.h.
ASSA::TimerCountdown::TimerCountdown | ( | TimeVal * | wait_time_ | ) | [inline] |
Constructor.
Definition at line 53 of file TimerCountdown.h.
: m_maxWaitTime (wt_), m_start (TimeVal::gettimeofday ()) { }
ASSA::TimerCountdown::~TimerCountdown | ( | ) | [inline] |
Destructor.
Definition at line 60 of file TimerCountdown.h.
References ASSA::TimeVal::gettimeofday(), m_maxWaitTime, m_start, and ASSA::TimeVal::zeroTime().
{ if (m_maxWaitTime == NULL) return; TimeVal elapsed (TimeVal::gettimeofday ()); elapsed -= m_start; if ( *m_maxWaitTime > elapsed ) *m_maxWaitTime -= elapsed; else *m_maxWaitTime = TimeVal::zeroTime (); }
TimeVal* ASSA::TimerCountdown::m_maxWaitTime [private] |
Maximum time to wait.
Definition at line 41 of file TimerCountdown.h.
Referenced by ~TimerCountdown().
TimeVal ASSA::TimerCountdown::m_start [private] |
Time when countdown started.
Definition at line 44 of file TimerCountdown.h.
Referenced by ~TimerCountdown().