Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: udp/ntp/ntpserver.c
- Revision:
- 123:44fea08759af
- Parent:
- 113:904b40231907
- Child:
- 124:6e558721ec1c
--- a/udp/ntp/ntpserver.c Tue Feb 12 13:15:42 2019 +0000
+++ b/udp/ntp/ntpserver.c Thu Feb 21 12:53:06 2019 +0000
@@ -33,7 +33,7 @@
if (!ClkTimeIsSet() ) return 3; //Alarm condition; clock is not synchronised
if (!ClkUtcGetNextLeapEnable()) return 0; //No warning
- int64_t nowTime = ClkUtcFromTai(ClkNowTime()); //This is TAI time
+ int64_t nowTime = ClkUtcFromTai(ClkNowTai());
int64_t liPriorNotice = LI_PRIOR_NOTICE_SECONDS << CLK_TIME_ONE_SECOND_SHIFT;
if (nowTime > ClkUtcGetNextEpoch() - liPriorNotice)
@@ -60,7 +60,7 @@
}
static uint64_t getRefNtp()
{
- return ClkTimeToNtpTimeStamp(ClkRefTime());
+ return ClkTimeToNtpTimeStamp(ClkRefTai());
}
int NtpServerRequest(void (*traceback)(void), struct NtpHeader* pHeaderRx, struct NtpHeader* pHeaderTx)
{