wxStopWatchThe wxStopWatch class allow you to measure time intervals. For example, you may use it to measure the time elapsed by some function:
wxStopWatch sw; CallLongRunningFunction(); wxLogMessage("The long running function took %ldms to execute", sw.Time()); sw.Pause(); ... stopwatch is stopped now ... sw.Resume(); CallLongRunningFunction(); wxLogMessage("And calling it twice took $ldms in all", sw.Time());Include files <wx/stopwatch.h> See also ::wxStartTimer, ::wxGetElapsedTime, wxTimer Members
wxStopWatch::wxStopWatch
wxStopWatch::wxStopWatchwxStopWatch() Constructor. This starts the stop watch.
wxStopWatch::Pausevoid Pause() Pauses the stop watch. Call wxStopWatch::Resume to resume time measuring again. If this method is called several times, Resume() must be called the same number of times to really resume the stop watch. You may, however, call Start to resume it unconditionally.
wxStopWatch::Resumevoid Resume() Resumes the stop watch which had been paused with wxStopWatch::Pause.
wxStopWatch::Startvoid Start(long milliseconds = 0) (Re)starts the stop watch with a given initial value.
wxStopWatch::Timelong Time() const Returns the time in milliseconds since the start (or restart) or the last call of wxStopWatch::Pause.
|