@MinDoc(copyright="Copyright 2016 A. Weinert", author="Albrecht Weinert", version="V.33", lastModified="27.03.2021", usage="implement", purpose="a common type for settable Clocks") public interface SClock extends EventListener
Clock, using the event to update its own time.
AClock's promises consistent readings and
updates. This most often implies synchronised implementations of all
AClockmethods. Notwithstanding this, it is essential for most clock sources used that no event listener method — neither
msChange()— must ever block the clock sources thread.
msChange()setting a (volatile) flag reseted by
update()plus implementing a conditional update, either explicitly or automatically on reads.
|Modifier and Type||Method and Description|
Set the time by an Instant.
Set the time by a ZonedDateTime.
Set the time by ms since 1.1.1970.
void instantChange(Instant instant)
instant- the changed time provided
void instantChange(ZonedDateTime actTimeZd)
actTimeZd- the changed time provided
void msChange(long ms)
ms- the changed time provided by the source