Package csw.time.core.models
Class TAITime
- java.lang.Object
- 
- csw.time.core.models.TAITime
 
- 
- All Implemented Interfaces:
- TMTTime,- java.io.Serializable,- scala.Equals,- scala.Product
 
 public final class TAITime extends java.lang.Object implements TMTTime, scala.Product, java.io.Serializable Represents an instantaneous point in International Atomic Time (TAI).param: value the underlying java.time.Instant- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description TAITime(java.time.Instant value)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TAITimenow()Obtains the PTP (Precision Time Protocol) synchronized current time in TAI timescale.static intoffset()Fetches UTC to TAI offset by doing a native call tontp_gettimexin case of a Linux machine.static play.api.libs.json.Format<TAITime>taiTimeFormat(play.api.libs.json.Format<java.time.Instant> instantFormat)UTCTimetoUTC()java.time.Instantvalue()- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface scala.ProductproductArity, productElement, productElementName, productElementNames, productIterator, productPrefix
 - 
Methods inherited from interface csw.time.core.models.TMTTimecurrentInstant, durationFromNow
 
- 
 
- 
- 
- 
Method Detail- 
taiTimeFormatpublic static play.api.libs.json.Format<TAITime> taiTimeFormat(play.api.libs.json.Format<java.time.Instant> instantFormat) 
 - 
nowpublic static 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
 
 - 
offsetpublic static 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
 
 
- 
 
-