Fix bug with wxStopWatch::Start() not resuming paused stopwatch any more.
Since r69835 the stop watch remained paused even when Start() was called. Do resume it when restarting it both for backwards compatibility and because it makes more sense and also document this behaviour. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -125,6 +125,10 @@ wxLongLong wxStopWatch::GetClockFreq() const
|
||||
|
||||
void wxStopWatch::Start(long t0)
|
||||
{
|
||||
// Calling Start() makes the stop watch run however many times it was
|
||||
// paused before.
|
||||
m_pauseCount = 0;
|
||||
|
||||
DoStart();
|
||||
|
||||
m_t0 -= (wxLongLong(t0)*GetClockFreq())/MILLISECONDS_PER_SECOND;
|
||||
|
||||
Reference in New Issue
Block a user