Class CoarseCachedClock
- java.lang.Object
-
- org.apache.logging.log4j.core.util.CoarseCachedClock
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longcurrentTimeMillis()Returns the value of a private long field that is updated by a background thread once every millisecond.static CoarseCachedClockinstance()Returns the singleton instance.
-
-
-
Method Detail
-
instance
public static CoarseCachedClock instance()
Returns the singleton instance.- Returns:
- the singleton instance
-
currentTimeMillis
public long currentTimeMillis()
Returns the value of a private long field that is updated by a background thread once every millisecond. Because timers on most platforms do not have millisecond granularity, the returned value may "jump" every 10 or 16 milliseconds.- Specified by:
currentTimeMillisin interfaceClock- Returns:
- the cached time
-
-