Simple timer meant to be used for measuring how much time has been spent in a certain code region.
Starts the timer.
Returns: | Returns the timer itself. |
---|---|
Return type: | Chronometer |
Raises TimerAlreadyStartedError: | |
If the timer is already running. |
Stops the timer.
Returns: | Time passed since the timer has been started in seconds. |
---|---|
Return type: | float |
Raises TimerAlreadyStoppedError: | |
If the timer is already stopped. |
Resets the timer.
Returns: | Elapsed time before the timer was reset. |
---|---|
Return type: | float |
Returns time passed in seconds.
Returns: | Time passed since the timer has been started in seconds. |
---|---|
Return type: | float |
Relaxed version which won’t raise an exception on double starting the timer.
Relaxed version which won’t raise an exception on double stopping the timer.
Ultra relaxed version which won’t throw any exceptions on its own.
Base exceptions for errors which happened inside Chronometer.