Class Ticker

  • All Implemented Interfaces:
    Serializable

    public class Ticker
    extends Object
    implements Serializable
    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 use StopWatch instead of interacting with this class directly.

    Warning: this type can only be used to measure elapsed time, not wall time.

    Author:
    com.google.common.base.Ticker
    See Also:
    Serialized Form
    • Constructor Detail

    • Method Detail

      • read

        public long read()
        Returns:
        the number of nanoseconds elapsed since this ticker's fixed point of reference.