\li a callback calls terminate()
\li the run queue becomes empty.
*/
- void process();
+ void process();
+
+ /** \brief \c true, if scheduler is running, \c false otherwise */
+ bool running();
/** \brief Called by callbacks to terminate the main loop
*/
void terminate();
+ /** \brief Immediately rescheduler
+
+ Calling yield() will cause the scheduler to terminate the current queue run and immediately
+ rescheduler all pending tasks.
+ */
+ void yield();
+
/** \brief Return timestamp of last event
This is the timestamp, the last event has been signaled. This is the real time at which the
*/
ClockService::clock_type eventTime();
+ /** \brief Return (approximate) current time
+
+ This call will return the current time as far as it is already known to the scheduler. If
+ the scheduler is running, this will return eventTime(), otherwise it will return
+ ClockService::now(). While the scheduler is running, this will reduce the number of system
+ calls.
+ */
+ ClockService::clock_type now();
+
/** \brief Set watchdog timeout to \a ms milliseconds.
Setting the watchdog timeout to 0 will disable the watchdog.