Interface Clock

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Clock
A monotonic time source in nanoseconds, so animations and timers can be driven by tests.
  • Field Summary

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

    Modifier and Type
    Method
    Description
    long
    Returns the current time.
  • Field Details

  • Method Details

    • nanos

      long nanos()
      Returns the current time.
      Returns:
      nanoseconds from an arbitrary origin