Interface TimeSource<T extends UnixTime>

Type Parameters:
T - generic type of current time
All Known Implementing Classes:
AbstractClock, AdjustableClock, DaytimeClock, FixedClock, HttpClock, NetTimeConnector, SntpConnector, SystemClock

public interface TimeSource<T extends UnixTime>

Represents any kind of clock as source of current world time.

Author:
Meno Hochschild
  • Method Summary

    Modifier and Type
    Method
    Description
    default Instant
    Obtains the current instant.
    Yields the current time.
  • Method Details

    • currentTime

      T currentTime()

      Yields the current time.

      Returns:
      current time in seconds (as UnixTime object or derivate)
    • currentInstant

      default Instant currentInstant()

      Obtains the current instant.

      Returns:
      current instant as JSR-310-type
      Since:
      5.6