fixed SF# 1916761: Bug in Stopwatch?

This commit is contained in:
Guenter Obiltschnig 2008-09-17 04:27:49 +00:00
parent 0880710370
commit e8b0025a5d

View File

@ -1,7 +1,7 @@
//
// Stopwatch.h
//
// $Id: //poco/svn/Foundation/include/Poco/Stopwatch.h#2 $
// $Id: //poco/Main/Foundation/include/Poco/Stopwatch.h#3 $
//
// Library: Foundation
// Package: DateTime
@ -93,16 +93,22 @@ private:
//
inline void Stopwatch::start()
{
_start.update();
_running = true;
if (!_running)
{
_start.update();
_running = true;
}
}
inline void Stopwatch::stop()
{
Timestamp current;
_elapsed += current - _start;
_running = false;
if (_running)
{
Timestamp current;
_elapsed += current - _start;
_running = false;
}
}