Skip to content

Commit c4f139a

Browse files
author
Martin Crossley
committed
Fix typos and duplicate line in lwipopts.h
1 parent da300ff commit c4f139a

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

pico_w/wifi/ntp_system_time/lwipopts.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
#define SNTP_RECV_TIMEOUT 15000
2626
// how often to query the NTP servers, in ms (60000 is the minimum permitted by RFC4330)
2727
#define SNTP_UPDATE_DELAY 3600000
28-
29-
// configure SNTP to use our callback to read the system time
30-
#define SNTP_GET_SYSTEM_TIME(sec, us) sntp_get_system_time_us(&(sec), &(us))
31-
3228
#define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT
3329
#define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10)
3430
#define SNTP_RETRY_TIMEOUT_EXP 1

pico_w/wifi/ntp_system_time/ntp_system_time.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,12 @@ int main() {
109109
// safely read the current time as UTC seconds and ms since the epoch
110110
get_time_utc(&ts);
111111

112-
// if you just want a string representation of the current time and you're not interested
113-
// in the individual date/time fields, then here you can simply call:
114-
115-
// if you don't need the date/time fields, you can call `ctime()` or one of its variants
116-
// here to convert the raw timer value into a string like "Mon Oct 27 22:06:08 2025\n".
112+
// if you don't need the date/time fields you can call `ctime()` or one of its variants
113+
// here to convert the UTC seconds count to a string like "Mon Oct 27 22:06:08 2025\n".
117114
// If you have defined a valid 'TZ' the string will be in local time, otherwise UTC.
118115
//printf("%s", ctime(&(ts.tv_sec)));
119116

120-
// you can extract the date/time fields use `localtime()` or one of its variants. If you
117+
// you can extract the date/time fields using `localtime()` or one of its variants. If you
121118
// have defined a valid 'TZ' then the field values will be in local time, otherwise UTC.
122119
pico_localtime_r(&(ts.tv_sec), &tm);
123120

0 commit comments

Comments
 (0)