6#include <IceUtil/Time.h>
118 class [[deprecated(
"Use armarx::core::time::StopWatch instead")]]
StopWatch
124 static IceUtil::Time
measure(std::function<
void(
void)> subjectToMeasure,
126 IceUtil::Time
stop();
134 IceUtil::Time m_starting_time;
135 IceUtil::Time m_time;
StopWatch(armarx::TimeMode timeMode=armarx::TimeMode::SystemTime)
static IceUtil::Time measure(std::function< void(void)> subjectToMeasure, armarx::TimeMode timeMode=armarx::TimeMode::SystemTime)
IceUtil::Time startingTime() const
IceUtil::Time stoppingTime() const
Clock to get date/time from a specific clock type or wait for certain durations or until certain date...
Represents a point in time.
Duration stop()
Stops the timer and returns the measured duration.
Duration stopAndReset()
Stops and resets the timer.
virtual ~StopWatch()
Destructs the StopWatch.
static Duration measure(std::function< void(void)> subjectToMeasure, ClockType clockType=ClockType::Virtual)
Measures the duration needed to execute the given lambda and returns it.
void reset()
Resets the timer.
bool isStopped() const
Returns whether the timer is stopped or is actively measuring time.
DateTime stoppingTime() const
Returns the date/time at stopping the timer.
DateTime startingTime() const
Returns the date/time at starting the timer.
StopWatch(ClockType clockType=ClockType::Virtual)
Constructs a StopWatch and starts it immediately.
TimeMode
Time mode to be used.
ClockType
Describes the type of clock.
@ Virtual
Time given by time server if configured, realtime otherwise.
This file offers overloads of toIce() and fromIce() functions for STL container types.