Skip to content

Commit 85c4cac

Browse files
author
Uli
committed
Fixed Readme
Initialization with a different timeserver had a missing ntpUDP Added the default values for interval and offset to the comment of the default constructor in the ReadMe
1 parent ac19e0d commit 85c4cac

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# NTPClient
1+
# NTPClient
22

33
[![Build Status](https://travis-ci.org/arduino-libraries/NTPClient.svg?branch=master)](https://travis-ci.org/arduino-libraries/NTPClient)
44

@@ -17,12 +17,13 @@ const char *password = "<PASSWORD>";
1717

1818
WiFiUDP ntpUDP;
1919

20-
// By default 'time.nist.gov' is used.
20+
// By default 'time.nist.gov' is used with 60 seconds update interval and
21+
// no offset
2122
NTPClient timeClient(ntpUDP);
2223

2324
// You can specify the time server pool and the offset, (in seconds)
2425
// additionaly you can specify the update interval (in milliseconds).
25-
// NTPClient timeClient("europe.pool.ntp.org", 3600, 60000);
26+
// NTPClient timeClient(ntpUDP, "europe.pool.ntp.org", 3600, 60000);
2627

2728
void setup(){
2829
Serial.begin(11520);
@@ -38,9 +39,9 @@ void setup(){
3839

3940
void loop() {
4041
timeClient.update();
41-
42+
4243
Serial.println(timeClient.getFormattedTime());
43-
44+
4445
delay(1000);
4546
}
4647
```

0 commit comments

Comments
 (0)