Package csw.time.core.models
Class TAITime$
- java.lang.Object
-
- csw.time.core.models.TAITime$
-
- All Implemented Interfaces:
java.io.Serializable
public class TAITime$ extends java.lang.Object implements java.io.Serializable- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TAITime$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TAITimeafter(scala.concurrent.duration.FiniteDuration duration)TAITimenow()Obtains the PTP (Precision Time Protocol) synchronized current time in TAI timescale.intoffset()Fetches UTC to TAI offset by doing a native call tontp_gettimexin case of a Linux machine.
-
-
-
Field Detail
-
MODULE$
public static final TAITime$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
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 callclock_gettimeinorder 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 tontp_gettimexin 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
-
-