Class SharedClockService

    • Method Detail

      • getTime

        public long getTime()
        Description copied from interface: IClockService
        Get the current time.
        Specified by:
        getTime in interface IClockService
        Returns:
        The current time.
      • getTick

        public double getTick()
        Description copied from interface: IClockService
        Get the current tick.
        Specified by:
        getTick in interface IClockService
        Returns:
        The current tick.
      • getStarttime

        public long getStarttime()
        Description copied from interface: IClockService
        Get the clocks start time.
        Specified by:
        getStarttime in interface IClockService
        Returns:
        The start time.
      • getDelta

        public long getDelta()
        Description copied from interface: IClockService
        Get the clock delta.
        Specified by:
        getDelta in interface IClockService
        Returns:
        The clock delta.
      • getState

        public java.lang.String getState()
        Description copied from interface: IClockService
        Get the clock state.
        Specified by:
        getState in interface IClockService
        Returns:
        The clock state.
      • setDelta

        public void setDelta​(long delta)
        Description copied from interface: IClockService
        Set the clock delta.
        Specified by:
        setDelta in interface IClockService
        Parameters:
        delta - The new clock delta.
      • getDilation

        public double getDilation()
        Description copied from interface: IClockService
        Get the clocks dilation.
        Specified by:
        getDilation in interface IClockService
        Returns:
        The clocks dilation. // Hack. Remove? only for continuous
      • setDilation

        public void setDilation​(double dilation)
        Description copied from interface: IClockService
        Set the clocks dilation.
        Specified by:
        setDilation in interface IClockService
        Parameters:
        dilation - The clocks dilation. // Hack. Remove? only for continuous
      • createTimer

        public ITimer createTimer​(long time,
                                  ITimedObject to)
        Description copied from interface: IClockService
        Create a new timer. The unit of the timespan value depends on the clock implementation. For system clocks, the time value should adhere to the time representation as used by System.currentTimeMillis().
        Specified by:
        createTimer in interface IClockService
        to - The timed object.
      • addChangeListener

        public void addChangeListener​(jadex.commons.IChangeListener listener)
        Description copied from interface: IClockService
        Add a change listener.
        Specified by:
        addChangeListener in interface IClockService
        Parameters:
        listener - The change listener.
      • removeChangeListener

        public void removeChangeListener​(jadex.commons.IChangeListener listener)
        Description copied from interface: IClockService
        Remove a change listener.
        Specified by:
        removeChangeListener in interface IClockService
        Parameters:
        listener - The change listener.
      • getClockType

        public java.lang.String getClockType()
        Description copied from interface: IClockService
        Get the clock type.
        Specified by:
        getClockType in interface IClockService
        Returns:
        The clock type.
      • advanceEvent

        public boolean advanceEvent()
        Description copied from interface: IClockService
        Advance one event.
        Specified by:
        advanceEvent in interface IClockService
        Returns:
        True, if clock could be advanced.
      • setClock

        public void setClock​(java.lang.String type,
                             jadex.commons.concurrent.IThreadPool tp)
        Description copied from interface: IClockService
        Set the clock.
        Specified by:
        setClock in interface IClockService