Package org.agrona.concurrent
Class SystemEpochClock
java.lang.Object
org.agrona.concurrent.SystemEpochClock
- All Implemented Interfaces:
EpochClock
Implementation that calls
System.currentTimeMillis()
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SystemEpochClock
As there is no instance state then this object can be used to save on allocation. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
INSTANCE
As there is no instance state then this object can be used to save on allocation.
-
-
Constructor Details
-
SystemEpochClock
public SystemEpochClock()Create a new instance.
-
-
Method Details
-
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:
-