Class SystemClock
java.lang.Object
org.apache.logging.log4j.core.util.SystemClock
- All Implemented Interfaces:
PreciseClock
,Clock
Implementation of the
Clock
interface that returns the system time.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the system time.void
init
(MutableInstant mutableInstant) Initializes the specified instant with time information as accurate as available on this platform.
-
Constructor Details
-
SystemClock
public SystemClock()
-
-
Method Details
-
currentTimeMillis
public long currentTimeMillis()Returns the system time.- Specified by:
currentTimeMillis
in interfaceClock
- Returns:
- the result of calling
System.currentTimeMillis()
-
init
Description copied from interface:PreciseClock
Initializes the specified instant with time information as accurate as available on this platform.- Specified by:
init
in interfacePreciseClock
- Parameters:
mutableInstant
- the container to be initialized with the accurate time information
-