Interface TimeProvider

All Known Implementing Classes:
MockTimeProvider

public interface TimeProvider
Provides the current time, i.e. System.currentTimeMillis(). This abstraction is done to be able to switch the implementation for time dependent tests.
Author:
Apache Directory Project
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TimeProvider
    The default time provider that always returns the system time.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Gets the current time in milliseconds sind 1970-01-01 UTC.
  • Field Details

    • DEFAULT

      static final TimeProvider DEFAULT
      The default time provider that always returns the system time.
  • Method Details

    • currentIimeMillis

      long currentIimeMillis()
      Gets the current time in milliseconds sind 1970-01-01 UTC.
      Returns:
      the current time in milliseconds sind 1970-01-01 UTC