Creates a new timer and starts it if start=true.
Returns the elapsed time in seconds since the last start-stop calls. The
returned value is not well
Starts the timer if it is not running.
Returns the average time in seconds recorded over all start-stop calls.
Returns the current elapsed time since the timer was started. Returns 0 if the
timer is not running.
Stops the timer. Has no effect is the timer has not been started.