Interface ITimeSource

All Known Implementing Classes:
AbstractTimeSource, SystemMilliTimer, SystemNanoTimer

public interface ITimeSource
Since:
1.3
Author:
Jan Waller
  • Method Summary

    Modifier and Type Method Description
    long getOffset()  
    long getTime()  
    java.util.concurrent.TimeUnit getTimeUnit()  
    java.lang.String toString()  
  • Method Details

    • getTime

      long getTime()
      Returns:
      The timestamp for the current time in TimeUnit.
      Since:
      1.3
      See Also:
      getTimeUnit()
    • getOffset

      long getOffset()
      Returns:
      The offset of the timesource to 1970-1-1 in TimeUnit.
      Since:
      1.7
      See Also:
      getTimeUnit()
    • getTimeUnit

      java.util.concurrent.TimeUnit getTimeUnit()
      Returns:
      The TimeUnit of the timesource.
      Since:
      1.7
    • toString

      java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
      Returns:
      A String representation of the timesource. E.g., the meaning of a timestamp from this source.
      Since:
      1.5