See


<project-file type=“source”/>

<content> #include <simschedule.h> #include <simutil.h>

#include <iostream> #include “simagent.h” SimSchedule::SimSchedule(float time) {

  Time = time;
  Owner = NULL;

}

SimSchedule::~SimSchedule() {

  if (Owner != NULL)
      Owner->unschedule(this);

}

void SimSchedule::setEventTime(float t) {

  // if no time change, do nothing
  if (Time == t) return;
  // Once unschedules, Owner will be NULL, so save it for reschedule
  Time = t;
  if (Owner != NULL) Owner->schedule(this);

} </content> <use name=“simschedule.h”/>