||Models a stopwatch, tracking wallclock time.|
Stopwatches can be started (run forwards and backwards), stopped, and read.
||Methods defined here:|
- __init__(self, running_now=False, running_forward=True, elapsed_prior=0, last_start_time=0)
- Instantiate like Stopwatch()
Stopwatch instance is stopped with 0 elapsed wallclock time.
- Returns a string representation for a Stopwatch, such that
s2 = eval(str(s1)) copies the state of s1 at the time of the call
- Returns the elapsed wallclock time in seconds as a float.
Works when the Stopwatch is running and when it is stopped.
- Stopwatch is now stopped with 0 elapsed wallclock time.
- Stopwatch is now running forwards, accumulating wallclock time.
- Stopwatch is now running backwards, [un]accumulating wallclock time.
- Returns the status of the Stopwatch: a tuple
(running?, forward?, elapsed) : (bool, bool, float)
- Stopwatch is now stopped: not accumulating wallclock time.
Data descriptors defined here:
- dictionary for instance variables (if defined)
- list of weak references to the object (if defined)