File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
author : Daniel Mohr
3
- date : 2023-01-18
3
+ date : 2023-08-02
4
4
url : https://github.com/ug-cp/precise_sntp
5
5
license : BSD 3-Clause License
6
6
---
Original file line number Diff line number Diff line change 1
1
name =precise_sntp
2
- version =0.2.4
2
+ version =0.2.5
3
3
author =Daniel Mohr <daniel.mohr@uni-greifswald.de>
4
4
maintainer =Daniel Mohr <daniel.mohr@uni-greifswald.de>
5
5
sentence =This library is an implementation of the Simple Network Time Protocol (SNTPv4) for the arduino platform providing sub-second precision.
Original file line number Diff line number Diff line change 1
1
/*
2
2
Author: Daniel Mohr
3
- Date: 2022-12-15
3
+ Date: 2023-08-02
4
4
5
5
For more information look at the README.md.
6
6
@@ -196,7 +196,10 @@ uint8_t precise_sntp::force_update(bool use_transmit_timestamp) {
196
196
unsigned long start_waiting = millis ();
197
197
int packetSize;
198
198
while (((packetSize = _udp->parsePacket ()) != NTP_PACKET_SIZE) &&
199
- (start_waiting + 1000 )) {
199
+ (millis () - start_waiting < 1000 )) {
200
+ // Wait until all data received. But wait maximal 1000 milliseconds.
201
+ // If millis overflows it is less 1000 milliseconds and
202
+ // otherwise it waits up to 1000 milliseconds for an answer.
200
203
}
201
204
if (packetSize != NTP_PACKET_SIZE) {
202
205
#ifdef PRECISE_SNTP_DEBUG
You can’t perform that action at this time.
0 commit comments