@@ -20,9 +20,9 @@ class Timer
2020 ~Timer (void );
2121
2222 // / Starts a timer for callbacks on the specified timeout interval.
23- // / @param[in] timeout - the timeout in milliseconds .
23+ // / @param[in] timeout - the timeout.
2424 // / @param[in] once - true if only one timer expiration
25- void Start (std::chrono::milliseconds timeout, bool once = false );
25+ void Start (dmq::Duration timeout, bool once = false );
2626
2727 // / Stops a timer.
2828 void Stop ();
@@ -31,16 +31,16 @@ class Timer
3131 // / @return TRUE if the timer is enabled, FALSE otherwise.
3232 bool Enabled () { return m_enabled; }
3333
34- // / Get the current time in ticks .
35- // / @return The current time in ticks .
36- static std::chrono::milliseconds GetTime ();
34+ // / Get the current time.
35+ // / @return The current time.
36+ static dmq::Duration GetTime ();
3737
38- // / Computes the time difference in ticks between two tick values taking into
38+ // / Computes the time difference between two duration values taking into
3939 // / account rollover.
40- // / @param[in] time1 - time stamp 1 in ticks .
41- // / @param[in] time2 - time stamp 2 in ticks .
42- // / @return The time difference in ticks .
43- static std::chrono::milliseconds Difference (std::chrono::milliseconds time1, std::chrono::milliseconds time2);
40+ // / @param[in] time1 - time stamp 1.
41+ // / @param[in] time2 - time stamp 2.
42+ // / @return The time difference.
43+ static dmq::Duration Difference (dmq::Duration time1, dmq::Duration time2);
4444
4545 // / Called on a periodic basic to service all timer instances.
4646 static void ProcessTimers ();
@@ -60,8 +60,8 @@ class Timer
6060 // / A lock to make this class thread safe.
6161 static std::mutex m_lock;
6262
63- std::chrono::milliseconds m_timeout = std::chrono::milliseconds (0 );
64- std::chrono::milliseconds m_expireTime = std::chrono::milliseconds (0 );
63+ dmq::Duration m_timeout = dmq::Duration (0 );
64+ dmq::Duration m_expireTime = dmq::Duration (0 );
6565 bool m_enabled = false ;
6666 bool m_once = false ;
6767 static bool m_timerStopped;
0 commit comments