mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-20 22:31:23 +01:00
fixed SF# 1916761: Bug in Stopwatch?
This commit is contained in:
parent
0880710370
commit
e8b0025a5d
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user