41 #include "../os/TimeService.hpp" 43 #include "../Logger.hpp" 44 #include "../os/threads.hpp" 45 #include "../os/MainThread.hpp" 47 #include "../os/StartStopManager.hpp" 49 using namespace extras;
58 os::CleanupFunction SIMCleanup( &stopSIMThread );
63 using namespace extras;
90 beat(
TimeService::Instance() ), maxsteps_(0), sim_running(false)
118 maxsteps_ = maxsteps;
126 unsigned int cur = 0;
127 this->sim_running =
true;
133 this->sim_running =
false;
170 if ( maxsteps_ == 0 || cursteps < maxsteps_ + 1 ) {
176 if ( cursteps == maxsteps_ ) {
The TimeService is used for system-wide time keeping and conversions.
static ThreadInterface * Instance()
Return an object which represents the main thread.
static std::ostream & nl(std::ostream &__os)
Insert a newline ' ' in the ostream.
virtual bool setScheduler(int sched_type)
Change the scheduler policy in which this thread runs.
A thread which is being run.
static std::ostream & endl(std::ostream &__os)
void enableSystemClock(bool yes_no)
Enables or disables reading the system clock.
Notify the Logger in which 'module' the message occured.
static Logger & log()
As Instance(), but more userfriendly.
virtual bool start()
Start the Thread.
const int LowestPriority
An integer denoting the lowest priority of the selected OS.
virtual bool stop()
Stop the Thread.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual int getPriority() const
The priority of this Thread.
virtual Seconds getPeriod() const
Get the periodicity in Seconds.
Seconds secondsChange(Seconds delta)
Change the time with delta seconds.
virtual const char * getName() const
Read the name of this task.
virtual bool isRunning() const
Returns whether the thread is running.