Class NanoClock (2.21.0)

  public 
  
 final 
  
 class 
 NanoClock 
  
 implements 
  
 ApiClock 
 , 
  
 Serializable 
 

Default implementation of the ApiClock interface, using call to System.nanoTime().

Inheritance

java.lang.Object > NanoClock

Implements

ApiClock , Serializable

Static Methods

getDefaultClock()

  public 
  
 static 
  
 ApiClock 
  
 getDefaultClock 
 () 
 
Returns
Type
Description

Methods

millisTime()

  public 
  
 final 
  
 long 
  
 millisTime 
 () 
 

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

Returns
Type
Description

nanoTime()

  public 
  
 final 
  
 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: