Class TimeChecker

java.lang.Object
microsim.statistics.TimeChecker

public class TimeChecker extends Object
The time checker is used by all the classes implementing the UpdatableSource interface to avoid repetitive updates.
Every time the UpdatableSource.updateSource() method of the user class is invoked, it asks TimeChecker if the update has been done yet at the current simulation time.
If the time checker is disabled it forces users to always update themselves.
  • Constructor Details

    • TimeChecker

      public TimeChecker()
  • Method Details

    • isUpToDate

      public boolean isUpToDate()
      The method checks if a call has been already done at current simulation time. In case it has not yet invoked it updates to current time.
      Returns:
      true if the method has not yet been invoked at the current time, false otherwise