Class BasicClock

java.lang.Object
org.episteme.social.history.clock.Clock
org.episteme.social.history.clock.BasicClock
All Implemented Interfaces:
Serializable, EventListener, TimeListener

public class BasicClock extends Clock
A basic clock implementation using standard ModernTime. Automatically synchronizes with the provided TimeServer. * @version 1.1
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • BasicClock

      public BasicClock(TimeServer timeServer)
      Creates a new BasicClock associated with a time server.
      Parameters:
      timeServer - the time server to monitor
  • Method Details

    • getTime

      public ModernTime getTime()
      Description copied from class: Clock
      Returns the current time representation held by this clock.
      Specified by:
      getTime in class Clock
      Returns:
      the current time
    • setTime

      public void setTime(ModernTime time)
      Updates the internal time state.
      Parameters:
      time - the new time state
      Throws:
      NullPointerException - if time is null
    • timeChanged

      public void timeChanged(TimeEvent event)
      Description copied from interface: TimeListener
      Invoked when a time change occurs on the monitored TimeServer.
      Parameters:
      event - the event containing the new time state