Class SystemTicker

java.lang.Object
io.netty.util.concurrent.SystemTicker
All Implemented Interfaces:
Ticker

final class SystemTicker extends Object implements Ticker
  • Field Details

    • INSTANCE

      static final SystemTicker INSTANCE
    • START_TIME

      private static final long START_TIME
  • Constructor Details

    • SystemTicker

      SystemTicker()
  • Method Details

    • initialNanoTime

      public long initialNanoTime()
      Description copied from interface: Ticker
      The initial value used for delay and computations based upon a monotonic time source.
      Specified by:
      initialNanoTime in interface Ticker
      Returns:
      initial value used for delay and computations based upon a monotonic time source.
    • nanoTime

      public long nanoTime()
      Description copied from interface: Ticker
      The time elapsed since initialization of this class in nanoseconds. This may return a negative number just like System.nanoTime().
      Specified by:
      nanoTime in interface Ticker
    • sleep

      public void sleep(long delay, TimeUnit unit) throws InterruptedException
      Description copied from interface: Ticker
      Waits until the given amount of time goes by.
      Specified by:
      sleep in interface Ticker
      Parameters:
      delay - the amount of delay.
      unit - the TimeUnit of delay.
      Throws:
      InterruptedException
      See Also: