Interface ExecutionContext

    • Method Detail

      • addStateListener

        void addStateListener​(ExecutionContext.StateListener listener)
        Add a listener for state changes.
        Parameters:
        listener - state listener, may not be null
      • removeStateListener

        void removeStateListener​(ExecutionContext.StateListener listener)
        Remove an existing state listener.
        Parameters:
        listener - state listener to remove
      • addClockListener

        void addClockListener​(ExecutionContext.ClockListener listener)
        Add a listener for clock changes. Listeners will be called every time the Root is active and its local time changes - the frequency of changes, and whether the frequency is fixed or variable, is Root implementation specific.
        Parameters:
        listener - clock listener, may not be null
      • removeClockListener

        void removeClockListener​(ExecutionContext.ClockListener listener)
        Remove an existing clock listener.
        Parameters:
        listener - clock listener to remove
      • getTime

        long getTime()
        Get the current Root local time in nanoseconds, relative to the RootHub clock.
        Returns:
        time in nanoseconds
      • getStartTime

        long getStartTime()
        Get the clock time in nanoseconds when the Root last became active. If the current state is not active, the return value is not valid.
        Returns:
        clock time became active
      • getPeriod

        default OptionalLong getPeriod()
        Get the optional update period, if the Root implementation guarantees to update clock time at a fixed frequency.
        Returns:
        optional update period