Class SystemEpochClock

java.lang.Object
org.agrona.concurrent.SystemEpochClock
All Implemented Interfaces:
EpochClock

public class SystemEpochClock extends Object implements EpochClock
Implementation that calls System.currentTimeMillis().
  • Field Details

    • INSTANCE

      public static final SystemEpochClock INSTANCE
      As there is no instance state then this object can be used to save on allocation.
  • Constructor Details

    • SystemEpochClock

      public SystemEpochClock()
  • Method Details

    • time

      public long time()
      Time in milliseconds since 1 Jan 1970 UTC.
      Specified by:
      time in interface EpochClock
      Returns:
      the number of milliseconds since 1 Jan 1970 UTC.
      See Also: