Package org.agrona.concurrent
Class SystemEpochClock
- java.lang.Object
-
- org.agrona.concurrent.SystemEpochClock
-
- All Implemented Interfaces:
EpochClock
public class SystemEpochClock extends java.lang.Object implements EpochClock
Implementation that callsSystem.currentTimeMillis()
.
-
-
Field Summary
Fields Modifier and Type Field Description static SystemEpochClock
INSTANCE
As there is no instance state then this object can be used to save on allocation.
-
Constructor Summary
Constructors Constructor Description SystemEpochClock()
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
time()
Time in milliseconds since 1 Jan 1970 UTC.
-
-
-
Field Detail
-
INSTANCE
public static final SystemEpochClock INSTANCE
As there is no instance state then this object can be used to save on allocation.
-
-
Method Detail
-
time
public long time()
Time in milliseconds since 1 Jan 1970 UTC.- Specified by:
time
in interfaceEpochClock
- Returns:
- the number of milliseconds since 1 Jan 1970 UTC.
- See Also:
System.currentTimeMillis()
-
-