reference: add function to get TAI-UTC offset
This commit is contained in:
parent
154b39cf7a
commit
a0fe71eef1
2 changed files with 15 additions and 0 deletions
12
reference.c
12
reference.c
|
@ -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
|
void
|
||||||
REF_GetTrackingReport(RPT_TrackingReport *rep)
|
REF_GetTrackingReport(RPT_TrackingReport *rep)
|
||||||
{
|
{
|
||||||
|
|
|
@ -184,6 +184,9 @@ extern void REF_DisableLocal(void);
|
||||||
and is better to discard any measurements */
|
and is better to discard any measurements */
|
||||||
extern int REF_IsLeapSecondClose(void);
|
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);
|
extern void REF_GetTrackingReport(RPT_TrackingReport *rep);
|
||||||
|
|
||||||
#endif /* GOT_REFERENCE_H */
|
#endif /* GOT_REFERENCE_H */
|
||||||
|
|
Loading…
Reference in a new issue