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.
void reset()
Reset the stopwatch.
void stop()
Stop the stopwatch.
boost::posix_time::time_duration getTotalDuration() const
Retrieves the total measured duration.
Stopwatch class implementation.
boost::posix_time::time_duration getLastDuration() const
Retrieves the measured duration.
void start()
Starts the stopwatch.
Defines the logger used by the top-level component of kea-lfc.
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.
virtual boost::posix_time::ptime getCurrentTime() const
Returns the current time.
StopwatchImpl()
Constructor.