Interface Ticker


public interface Ticker
Elapsed time for the schedules of the lease and window keepers: monotonic, unlike the wall clock the ids use, so a clock step neither stalls nor rushes a renewal. Tests drive a manual one.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Ticker
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    The current tick.
    void
    sleep(long nanos)
    Waits nanos.
  • Field Details

    • SYSTEM

      static final Ticker SYSTEM
  • Method Details

    • nanoTime

      long nanoTime()
      The current tick.
      Returns:
      nanoseconds from an arbitrary origin
    • sleep

      void sleep(long nanos) throws InterruptedException
      Waits nanos.
      Parameters:
      nanos - how long to wait
      Throws:
      InterruptedException - if interrupted