Interface Clock


public interface Clock
Where the parts of the layer that judge time -- a token's expiry, a rate limit's window -- read it from, so a test can move it.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Clock
    The time of the machine.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Milliseconds since the epoch.
  • Field Details

    • SYSTEM

      static final Clock SYSTEM
      The time of the machine.
  • Method Details

    • currentTimeMillis

      long currentTimeMillis()
      Milliseconds since the epoch.