************ wx.StopWatch ************ Inheritance diagram for `wx.StopWatch`: | .. inheritance-diagram:: wx.StopWatch | Description =========== The `wx.StopWatch` class allow you to measure time intervals. For example, you may use it to measure the time elapsed by some function:: sw = wx.StopWatch() # Call some long running method... CallLongRunningFunction() print "The long running function took %ld ms to execute"%sw.Time() sw.Pause() # ... stopwatch is stopped now ... sw.Resume() CallLongRunningFunction() print "And calling it twice took %ld ms in all"%sw.Time() .. seealso:: `wx.StartTimer <../wxFunctions.html#StartTimer>`_, `wx.GetElapsedTime <../wxFunctions.html#GetElapsedTime>`_, `wx.Timer `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `Pause <#Pause>`_ * `Resume <#Resume>`_ * `Start <#Start>`_ * `Time <#Time>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() Constructor. This starts the stop watch. -------- .. method:: Pause() Pauses the stop watch. Call `Resume <#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 <#Start>`_ to resume it unconditionally. -------- .. method:: Resume() Resumes the stop watch which had been paused with `Pause <#Pause>`_. -------- .. method:: Start(milliseconds=0) (Re)starts the stop watch with a given initial value. **Parameters:** * `milliseconds` (long) -------- .. method:: Time() Returns the time in milliseconds since the start (or restart) or the last call of `Pause <#Pause>`_. | **Returns:** `long`