Class IdServerClock

java.lang.Object
com.io7m.idstore.server.service.clock.IdServerClock
All Implemented Interfaces:
com.io7m.repetoir.core.RPServiceType

public final class IdServerClock extends Object implements com.io7m.repetoir.core.RPServiceType
A service that exposes a clock.
  • Constructor Details

    • IdServerClock

      public IdServerClock(Clock inClock)
      A service that exposes a clock.
      Parameters:
      inClock - The clock
  • Method Details

    • description

      public String description()
      Specified by:
      description in interface com.io7m.repetoir.core.RPServiceType
    • now

      public OffsetDateTime now()
      Returns:
      The current time to the nearest second
    • nowPrecise

      public OffsetDateTime nowPrecise()
      Returns:
      The current time
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clock

      public Clock clock()
      Returns:
      The underlying clock