Class TAITime$

java.lang.Object
csw.time.core.models.TAITime$
All Implemented Interfaces:
Serializable

public class TAITime$ extends Object implements Serializable
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TAITime$
    Static reference to the singleton instance of this Scala object.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    after(scala.concurrent.duration.FiniteDuration duration)
     
    now()
    Obtains the PTP (Precision Time Protocol) synchronized current time in TAI timescale.
    int
    Fetches UTC to TAI offset by doing a native call to ntp_gettimex in case of a Linux machine.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MODULE$

      public static final TAITime$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • TAITime$

      public TAITime$()
  • Method Details

    • now

      public TAITime now()
      Obtains the PTP (Precision Time Protocol) synchronized current time in TAI timescale. In case of a Linux machine, this will make a native call clock_gettime inorder to get time from the system clock with nanosecond precision In case of all the other operating systems, nanosecond precision is not supported, hence no native call is made.

      Returns:
      current time in TAI scale
    • after

      public TAITime after(scala.concurrent.duration.FiniteDuration duration)
    • offset

      public int offset()
      Fetches UTC to TAI offset by doing a native call to ntp_gettimex in case of a Linux machine. It ensures to get the latest offset as updated by the PTP Grandmaster.

      Returns:
      offset of UTC to TAI in seconds