41 #include <boost/weak_ptr.hpp>
static nsecs ticks2nsecs(const ticks t)
static boost::shared_ptr< SimClockActivityManager > Instance()
Get an instance of the singleton.
static boost::weak_ptr< SimClockActivityManager > singleton
SimClockActivityManager singleton.
SimClockActivityManager()
The SimClockActivityManager is a singleton and is constructed by calling Instance() ...
~SimClockActivityManager()
void setSimulationPeriod(RTT::Seconds s)
RTT::os::Mutex modify_activities_mutex_
Mutex used to exclude adding and removing activities from the update to all activities.
void add(SimClockActivity *activity)
Add an activity to the manager.
static TimeService * Instance()
static boost::shared_ptr< SimClockActivityManager > GetInstance()
Get an instance of the singleton if it exists, null pointer otherwise.
virtual RTT::os::TimeService::ticks getLastExecutionTicks() const
RTT::Seconds getSimulationPeriod() const
void remove(SimClockActivity *activity)
Remove an activity from the manager.
virtual RTT::Seconds getPeriod() const
std::list< SimClockActivity * > activities_
All existing SimClockActivities.
void update()
Execute all activities modulo their desired periods.
RTT::Seconds simulation_period_
The desired/expected simulation period.