Package com.google.common.base
Class Ticker
- java.lang.Object
- 
- com.google.common.base.Ticker
 
- 
 @GwtCompatible public abstract class Ticker extends java.lang.Object A time source; returns a time value representing the number of nanoseconds elapsed since some fixed but arbitrary point in time. Note that most users should useStopwatchinstead of interacting with this class directly.Warning: this interface can only be used to measure elapsed time, not wall time. - Since:
- 10.0 (mostly source-compatible since 9.0)
- Author:
- Kevin Bourrillion
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedTicker()Constructor for use by subclasses.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract longread()Returns the number of nanoseconds elapsed since this ticker's fixed point of reference.static TickersystemTicker()A ticker that reads the current time usingSystem.nanoTime().
 
- 
- 
- 
Constructor Detail- 
Tickerprotected Ticker() Constructor for use by subclasses.
 
- 
 - 
Method Detail- 
readpublic abstract long read() Returns the number of nanoseconds elapsed since this ticker's fixed point of reference.
 - 
systemTickerpublic static Ticker systemTicker() A ticker that reads the current time usingSystem.nanoTime().- Since:
- 10.0
 
 
- 
 
-