Interface TimeFunction

    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static long toExpectedRange​(long timestamp)
      Clears the leading bits so that the resulting number is in the range 0 to 2^60-1.
      static long toUnixTimestamp​(Instant instant)
      Converts an instant to a number of 100-nanoseconds since 1970-01-01 (Unix epoch).
    • Method Detail

      • toUnixTimestamp

        static long toUnixTimestamp​(Instant instant)
        Converts an instant to a number of 100-nanoseconds since 1970-01-01 (Unix epoch).
        Parameters:
        instant - an instant
        Returns:
        a number of 100-nanoseconds since 1970-01-01 (Unix epoch)
      • toExpectedRange

        static long toExpectedRange​(long timestamp)
        Clears the leading bits so that the resulting number is in the range 0 to 2^60-1.

        The result is equivalent to n % 2^60.

        Parameters:
        timestamp - a number of 100-nanoseconds since 1970-01-01 (Unix epoch)
        Returns:
        a number in the range 0 to 2^60-1.