Class TimeSensor


  • public class TimeSensor
    extends Sensor
    This class implements a simple time sensor class. It extends the abstract base class sensor. Time is obtained directly from the system, and sensor value listeners are notified with given time interval about the current time.
    • Constructor Detail

      • TimeSensor

        public TimeSensor​(java.lang.String id,
                          int timeInterval)
        Creates a new TimeSensor
        Parameters:
        timeInterval - the time interval in milliseconds
      • TimeSensor

        public TimeSensor​(int timeInterval)
        Creates a new TimeSensor
        Parameters:
        timeInterval - the time interval in milliseconds
    • Method Detail

      • startUpdates

        public void startUpdates()
        Description copied from class: Sensor
        Starts receiving sensor data values
        Specified by:
        startUpdates in class Sensor
      • stopUpdates

        public void stopUpdates()
        Description copied from class: Sensor
        Stops receiving sensor data values
        Specified by:
        stopUpdates in class Sensor