reference: add function to get TAI-UTC offset

This commit is contained in:
Chris Perl 2017-10-10 13:23:20 -04:00 committed by Miroslav Lichvar
parent 154b39cf7a
commit a0fe71eef1
2 changed files with 15 additions and 0 deletions

View file

@ -1356,6 +1356,18 @@ int REF_IsLeapSecondClose(void)
/* ================================================== */
int
REF_GetTaiOffset(struct timespec *ts)
{
int tai_offset;
get_tz_leap(ts->tv_sec, &tai_offset);
return tai_offset;
}
/* ================================================== */
void
REF_GetTrackingReport(RPT_TrackingReport *rep)
{

View file

@ -184,6 +184,9 @@ extern void REF_DisableLocal(void);
and is better to discard any measurements */
extern int REF_IsLeapSecondClose(void);
/* Return TAI-UTC offset corresponding to a time in UTC if available */
extern int REF_GetTaiOffset(struct timespec *ts);
extern void REF_GetTrackingReport(RPT_TrackingReport *rep);
#endif /* GOT_REFERENCE_H */