Package com.google.api.core
Interface ApiClock
-
- All Known Implementing Classes:
CurrentMillisClock,NanoClock
public interface ApiClockAn interface for getting the current value of a high-resolution time source, in nanoseconds.Clocks other than
NanoClockare typically used only for testing.This interface is required in addition to Java 8's Clock, because nanoTime is required to compare values with io.grpc.CallOptions.getDeadlineNanoTime().
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longmillisTime()Returns the current value of this clock's high-resolution time source, in milliseconds.longnanoTime()Returns the current value of this clock's high-resolution time source, in nanoseconds.
-