mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 02:06:04 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user