1 \section{\class{wxStopWatch
}}\label{wxstopwatch
}
3 The wxStopWatch class allow you to measure time intervals. For example, you may
4 use it to measure the time elapsed by some function:
8 CallLongRunningFunction();
9 wxLogMessage("The long running function took
%ldms to execute",
12 ... stopwatch is stopped now ...
14 CallLongRunningFunction();
15 wxLogMessage("And calling it twice took $ldms in all", sw.Time());
18 \wxheading{Include files
}
24 \helpref{::wxStartTimer
}{wxstarttimer
},
\helpref{::wxGetElapsedTime
}{wxgetelapsedtime
},
\helpref{wxTimer
}{wxtimer
}
26 \latexignore{\rtfignore{\wxheading{Members
}}}
28 \membersection{wxStopWatch::wxStopWatch
}\label{wxstopwatchctor
}
30 \func{}{wxStopWatch
}{\void}
32 Constructor. This starts the stop watch.
34 \membersection{wxStopWatch::Pause
}\label{wxstopwatchpause
}
36 \func{void
}{Pause
}{\void}
38 Pauses the stop watch. Call
\helpref{wxStopWatch::Resume
}{wxstopwatchresume
} to resume
41 If this method is called several times,
{\tt Resume()
} must be called the same
42 number of times to really resume the stop watch. You may, however, call
43 \helpref{Start
}{wxstopwatchstart
} to resume it unconditionally.
45 \membersection{wxStopWatch::Resume
}\label{wxstopwatchresume
}
47 \func{void
}{Resume
}{\void}
49 Resumes the stop watch which had been paused with
50 \helpref{wxStopWatch::Pause
}{wxstopwatchpause
}.
52 \membersection{wxStopWatch::Start
}\label{wxstopwatchstart
}
54 \func{void
}{Start
}{\param{long
}{ milliseconds =
0}}
56 (Re)starts the stop watch with a given initial value.
58 \membersection{wxStopWatch::Time
}\label{wxstopwatchtime
}
60 \constfunc{long
}{Time
}{\void}\label{wxstopwatchtime
}
62 Returns the time in milliseconds since the start (or restart) or the last call of
63 \helpref{wxStopWatch::Pause
}{wxstopwatchpause
}.