added Clock class which provides a monotonic clock on most platforms and is now used by Poco::Timer, Poco::Stopwatch, Poco::TimedNotificationQueue and Poco::UtilTimer to avoid issues when the system time is changed

This commit is contained in:
Guenter Obiltschnig
2013-12-12 18:33:29 +01:00
parent 5edb90c48e
commit ac2b26fcb9
47 changed files with 884 additions and 48 deletions

View File

@@ -1,7 +1,7 @@
//
// Stopwatch.cpp
//
// $Id: //poco/1.4/Foundation/src/Stopwatch.cpp#1 $
// $Id: //poco/1.4/Foundation/src/Stopwatch.cpp#2 $
//
// Library: Foundation
// Package: DateTime
@@ -50,11 +50,11 @@ Stopwatch::~Stopwatch()
}
Timestamp::TimeDiff Stopwatch::elapsed() const
Clock::ClockDiff Stopwatch::elapsed() const
{
if (_running)
{
Timestamp current;
Clock current;
return _elapsed + (current - _start);
}
else