public final class CachedClock extends Object implements Clock
Clockinterface that tracks the time in a private long field that is updated by a background thread once every millisecond. Timers on most platforms do not have millisecond granularity, so the returned value may "jump" every 10 or 16 milliseconds. To reduce this problem, this class also updates the internal time value every 1024 calls to
|Modifier and Type||Method and Description|
Returns the value of a private long field that is updated by a background thread once every millisecond.
public long currentTimeMillis()
Copyright © 1999-2017 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.