15using namespace boost::posix_time;
43boost::posix_time::time_duration
45 return (impl_->getLastDuration());
48boost::posix_time::time_duration
50 return (impl_->getTotalDuration());
Stopwatch class implementation.
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.
long getLastMilliseconds() const
Retrieves the last measured duration in milliseconds.
long getLastMicroseconds() const
Retrieves the last measured duration in microseconds.
long getTotalMilliseconds() const
Retrieves the total measured duration in milliseconds.
Stopwatch(const bool autostart=true)
Constructor.
void stop()
Stops the stopwatch.
long getTotalMicroseconds() const
Retrieves the total measured duration in microseconds.
boost::posix_time::time_duration getLastDuration() const
Retrieves last measured duration.
void start()
Starts the stopwatch.
std::string logFormatTotalDuration() const
Returns the total measured duration in the format directly usable in the log messages.
void reset()
Resets the stopwatch.
std::string logFormatLastDuration() const
Returns the last measured duration in the format directly usable in log messages.
boost::posix_time::time_duration getTotalDuration() const
Retrieves total measured duration.
Defines the logger used by the top-level component of kea-lfc.