Class BasicClock
java.lang.Object
org.episteme.social.history.clock.Clock
org.episteme.social.history.clock.BasicClock
- All Implemented Interfaces:
Serializable, EventListener, TimeListener
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 Summary
ConstructorsConstructorDescriptionBasicClock(TimeServer timeServer) Creates a new BasicClock associated with a time server. -
Method Summary
Modifier and TypeMethodDescriptiongetTime()Returns the current time representation held by this clock.voidsetTime(ModernTime time) Updates the internal time state.voidtimeChanged(TimeEvent event) Invoked when a time change occurs on the monitoredTimeServer.Methods inherited from class Clock
getTimeServer, toString
-
Constructor Details
-
BasicClock
Creates a new BasicClock associated with a time server.- Parameters:
timeServer- the time server to monitor
-
-
Method Details
-
getTime
Description copied from class:ClockReturns the current time representation held by this clock. -
setTime
Updates the internal time state.- Parameters:
time- the new time state- Throws:
NullPointerException- if time is null
-
timeChanged
Description copied from interface:TimeListenerInvoked when a time change occurs on the monitoredTimeServer.- Parameters:
event- the event containing the new time state
-