Class SystemClock
- java.lang.Object
-
- org.apache.logging.log4j.core.util.SystemClock
-
- All Implemented Interfaces:
PreciseClock,Clock
public final class SystemClock extends java.lang.Object implements Clock, PreciseClock
Implementation of theClockinterface that returns the system time.
-
-
Constructor Summary
Constructors Constructor Description SystemClock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcurrentTimeMillis()Returns the system time.voidinit(MutableInstant mutableInstant)Initializes the specified instant with time information as accurate as available on this platform.
-
-
-
Method Detail
-
currentTimeMillis
public long currentTimeMillis()
Returns the system time.- Specified by:
currentTimeMillisin interfaceClock- Returns:
- the result of calling
System.currentTimeMillis()
-
init
public void init(MutableInstant mutableInstant)
Description copied from interface:PreciseClockInitializes the specified instant with time information as accurate as available on this platform.- Specified by:
initin interfacePreciseClock- Parameters:
mutableInstant- the container to be initialized with the accurate time information
-
-