org.apache.kafka.common.utils
Class SystemTime

java.lang.Object
  extended by org.apache.kafka.common.utils.SystemTime
All Implemented Interfaces:
Time

public class SystemTime
extends java.lang.Object
implements Time

A time implementation that uses the system clock and sleep call


Constructor Summary
SystemTime()
           
 
Method Summary
 long milliseconds()
          The current time in milliseconds
 long nanoseconds()
          The current time in nanoseconds
 void sleep(long ms)
          Sleep for the given number of milliseconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemTime

public SystemTime()
Method Detail

milliseconds

public long milliseconds()
Description copied from interface: Time
The current time in milliseconds

Specified by:
milliseconds in interface Time

nanoseconds

public long nanoseconds()
Description copied from interface: Time
The current time in nanoseconds

Specified by:
nanoseconds in interface Time

sleep

public void sleep(long ms)
Description copied from interface: Time
Sleep for the given number of milliseconds

Specified by:
sleep in interface Time