Hi, I just noticed that if you call stop() multiple times in succession on a stopwatch you get erroneous elapsed times, and if you call start() multiple times it restarts the stopwatch each time. I think the expected behavior would be start() to start/unpause the stopwatch and stop() to stop/pause it.
I got the stopwatch to work as I expected it to do by checking if the stopwatch is running/stopped in the inlines... What do you think?
inline void Stopwatch::start()
{
if(!_running){
_start.update();
_running = true;
}
}
inline void Stopwatch::stop()
{
if(_running){
Timestamp current;
_elapsed += current - _start;
_running = false;
}
}





