7 #ifndef STOPWATCH_IMPL_H
8 #define STOPWATCH_IMPL_H
10 #include <boost/date_time/posix_time/posix_time.hpp>
11 #include <boost/scoped_ptr.hpp>
88 logFormat(
const boost::posix_time::time_duration& duration);
111 boost::posix_time::ptime last_start_;
114 boost::posix_time::ptime last_stop_;
118 boost::posix_time::time_duration cumulative_time_;
125 #endif // STOPWATCH_H
virtual ~StopwatchImpl()
Virtual destructor.
boost::posix_time::time_duration getLastDuration() const
Retrieves the measured duration.
boost::posix_time::time_duration getTotalDuration() const
Retrieves the total measured duration.
void reset()
Reset the stopwatch.
void stop()
Stop the stopwatch.
Stopwatch class implementation.
void start()
Starts the stopwatch.
virtual boost::posix_time::ptime getCurrentTime() const
Returns the current time.
Defines the logger used by the top-level component of kea-dhcp-ddns.
static std::string logFormat(const boost::posix_time::time_duration &duration)
Returns the duration in the textual format which can be directly used in log messages.
StopwatchImpl()
Constructor.