Interface ApiClock (2.25.0)

  public 
  
 interface 
 ApiClock 
 

An interface for getting the current value of a high-resolution time source, in nanoseconds.

Clocks other than NanoClock are 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().

Methods

millisTime()

  public 
  
 abstract 
  
 long 
  
 millisTime 
 () 
 

Returns the current value of this clock's high-resolution time source, in milliseconds.

Returns
Type
Description

nanoTime()

  public 
  
 abstract 
  
 long 
  
 nanoTime 
 () 
 

Returns the current value of this clock's high-resolution time source, in nanoseconds.

Returns
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: