Interface UnixTime

All Known Subinterfaces:
UniversalTime
All Known Implementing Classes:
Moment, ZonalDateTime

public interface UnixTime

Represents any UNIX timestamp.

Author:
Meno Hochschild
See Also:
TimeScale.POSIX
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Yields the nanosecond fraction of current second.
    long
    Counts the seconds elapsed since UNIX epoch [1970-01-01T00:00:00Z] in UTC timezone.
  • Method Details

    • getPosixTime

      long getPosixTime()

      Counts the seconds elapsed since UNIX epoch [1970-01-01T00:00:00Z] in UTC timezone.

      Returns:
      count of seconds since UNIX-epoch at [1970-01-01T00:00:00Z] without leap seconds in the timezone UTC (Greenwich)
    • getNanosecond

      int getNanosecond()

      Yields the nanosecond fraction of current second.

      As time unit, the nanosecond is defined as one billionth part of a second).

      Returns:
      count of nanoseconds as fraction of last second in the range 0 - 999.999.999