Package com.io7m.idstore.server.internal

# Class IdServerClock

java.lang.Object
com.io7m.idstore.server.internal.IdServerClock

All Implemented Interfaces:
  `IdServiceType`

public final class IdServerClock extends Object implements IdServiceType
A service that exposes a clock.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdServerClock(Clock inClock)`
  A service that exposes a clock.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `description()`
  `OffsetDateTime`
  `now()`
  `OffsetDateTime`
  `nowPrecise()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## 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 `IdServiceType`
    Returns:
      The service description

  - ### 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`