- OBTimer(OBTimerQueueManager *m, OBTimeoutHandler h, OBTimeoutData d);
- virtual ~OBTimer();
-
- void fireTimeout();
-
- inline bool isTiming() const { return timing; }
- inline bool isRecurring() const { return recur; }
-
- inline const timeval &getTimeout() const { return _timeout; }
- inline const timeval &getStartTime() const { return _start; }
-
- timeval timeRemaining(const timeval &tm) const;
+ //! Constructs a new Timer object
+ /*!
+ @param m The TimerQueueManager with which to associate. The manager
+ specified will be resposible for making this timer fire.
+ @param h The function to call when the timer fires
+ @param d The data to pass along to the function call when the timer fires
+ */
+ Timer(TimerQueueManager *m, TimeoutHandler h, TimeoutData d);
+ //! Destroys the Timer object
+ virtual ~Timer();
+
+ //! Fires the timer, calling its TimeoutHandler
+ void fire();
+
+ //! Returns if the Timer is started and timing
+ inline bool timing() const { return _timing; }
+ //! Returns if the Timer is going to repeat
+ inline bool recurring() const { return _recur; }
+
+ //! Gets the amount of time the Timer should last before firing
+ inline const timeval &timeout() const { return _timeout; }
+ //! Gets the time at which the Timer started
+ inline const timeval &startTime() const { return _start; }
+
+ //! Gets the amount of time left before the Timer fires
+ timeval remainingTime(const timeval &tm) const;
+ //! Returns if the Timer is past its timeout time, and should fire