Package io.grpc

Class Deadline.Ticker

  • Enclosing class:
    Deadline

    public abstract static class Deadline.Ticker
    extends Object
    Time source representing nanoseconds since fixed but arbitrary point in time.

    DO NOT use custom Deadline.Ticker implementations in production, because deadlines created with custom tickers are incompatible with those created with the system ticker. Always use the system ticker whenever you need to provide one in production code.

    This is EXPERIMENTAL API and may subject to change. If you'd like it to be stabilized or have any feedback, please let us know.

    In general implementations should be thread-safe, unless it's implemented and used in a localized environment (like unit tests) where you are sure the usages are synchronized.

    Since:
    1.24.0
    • Constructor Detail

      • Ticker

        public Ticker()
    • Method Detail

      • nanoTime

        public abstract long nanoTime()
        Returns the number of nanoseconds since this source's epoch.