11#ifndef YARP_NO_DEPRECATED
12#define YARP_INCLUDING_DEPRECATED_HEADER_ON_PURPOSE
14#undef YARP_INCLUDING_DEPRECATED_HEADER_ON_PURPOSE
72 TimerSettings(
double inPeriod,
size_t count,
double seconds,
double inTollerance) :
76 tolerance(inTollerance)
109#ifndef YARP_NO_DEPRECATED
149 Timer(settings,
std::bind(callback, object,
std::placeholders::_1), newThread, mutex)
164 Timer(settings,
std::bind(callback, object,
std::placeholders::_1), newThread, mutex)
183 const TimerCallback& callback,
185 std::mutex* mutex =
nullptr);
203 std::mutex* mutex =
nullptr) :
205 Timer(settings,
std::bind(callback, object,
std::placeholders::_1), newThread, mutex)
217 std::mutex* mutex =
nullptr) :
219 Timer(settings,
std::bind(callback, object,
std::placeholders::_1), newThread, mutex)
237 virtual bool start();
243 virtual bool isRunning();
245#ifndef DOXYGEN_SHOULD_SKIP_THIS
Basic wrapper for mutual exclusion.
Timer(const yarp::os::TimerSettings &settings, bool(T::*callback)(const yarp::os::YarpTimerEvent &), T *object, bool newThread, std::mutex *mutex=nullptr)
Timer constructor.
Timer(const yarp::os::TimerSettings &settings, bool(T::*callback)(const yarp::os::YarpTimerEvent &), T *object, bool newThread, yarp::os::Mutex *mutex)
Timer constructor.
Timer(const Timer &)=delete
std::function< bool(const yarp::os::YarpTimerEvent &)> TimerCallback
Timer operator=(const Timer &)=delete
Timer(const yarp::os::TimerSettings &settings, bool(T::*callback)(const yarp::os::YarpTimerEvent &) const, const T *object, bool newThread, yarp::os::Mutex *mutex)
const version.
Timer(const yarp::os::TimerSettings &settings, bool(T::*callback)(const yarp::os::YarpTimerEvent &) const, const T *object, bool newThread, std::mutex *mutex=nullptr)
const version.
An interface to the operating system, including Port based communication.
TimerSettings(double inPeriod, size_t count, double seconds, double inTollerance)
bool operator==(const TimerSettings &rhs) const
TimerSettings(double inPeriod, size_t count, double seconds)
TimerSettings(double inPeriod)
double lastReal
lastReal when the last callback actually happened
double lastExpected
lastExpected when the last callback actually happened
double currentReal
currentReal When the current callback is actually being called
double lastDuration
lastDuration Contains the duration of the last callback
unsigned int runCount
runCount the count of calls
double currentExpected
currentExpected this is when the current callback should have been called
#define YARP_WARNING_POP
Ends a temporary alteration of the enabled warnings.
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
#define YARP_DISABLE_DEPRECATED_WARNING
Disable deprecated warnings in the following code.