Skip to content

Commit b147afa

Browse files
author
gemi254
committed
Updated v2.8.6
1 parent 280f20d commit b147afa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ Variables ending with **CA_NTPSYNC_KEY** for example **ntp_server1**, **ntp_ser
344344
will be used as ntp servers.
345345
The current timezone for the device will be set automatically using **CA_TIMEZONE_KEY** for example **time_zone**
346346

347-
Just define **ntp_server1**, **ntp_server2**, **ntp_server3** and **time_zone** settings in your config and call **syncTime** with timeout ms to wait until time is synchronized. User force = true to reset clock and wait time to be synchronized.
347+
Just define **ntp_server1**, **ntp_server2**, **ntp_server3** and **time_zone** settings in your config and call **syncTime** with timeout ms to wait until time is synchronized. Use force = true to reset clock and wait the time to be synchronized.
348348
```
349349
- ntp_server1:
350350
label: Time server to sync time1
@@ -364,6 +364,10 @@ Just define **ntp_server1**, **ntp_server2**, **ntp_server3** and **time_zone**
364364
// Clock will be reseted and wait for max 20 sec to sync
365365
// If fail clock will be restored
366366
confHelper.syncTime(20000, true);
367+
or
368+
// Sync time, force to reset clock, async to not wait for sync
369+
// In asynchronous mode, if time synchronization fails, no restoration of the clock occurs.
370+
confHelper.syncTimeAsync(20000, true);
367371
368372
```
369373

0 commit comments

Comments
 (0)