- wxStopWatch() { Start(); }
- void Start(long t = 0);
- void Pause() { m_pause = GetElapsedTime(); }
- void Resume() { Start(m_pause); }
+ wxStopWatch() { m_pauseCount = 0; Start(); }
+
+ // start the stop watch at the moment t0
+ void Start(long t0 = 0);
+
+ // pause the stop watch
+ void Pause() { if ( !m_pauseCount++) m_pause = GetElapsedTime(); }
+
+ // resume it
+ void Resume() { if ( !--m_pauseCount ) Start(m_pause); }