Add note about calling sntp.sync periodically
This commit is contained in:
parent
aa5fd1445d
commit
3eccf506d1
|
@ -10,7 +10,9 @@ When compiled together with the [rtctime](rtctime.md) module it also offers seam
|
|||
|
||||
## sntp.sync()
|
||||
|
||||
Attempts to obtain time synchronization.
|
||||
Attempts to obtain time synchronization.
|
||||
|
||||
For best results you may want to to call this periodically in order to compensate for internal clock drift. As stated in the [rtctime](rtctime.md) module documentation it's advisable to sync time after deep sleep and it's necessary to sync after module reset (add it to [`init.lua`](upload.md#initlua) after WiFi initialization).
|
||||
|
||||
#### Syntax
|
||||
`sntp.sync([server_ip], [callback], [errcallback])`
|
||||
|
|
Loading…
Reference in New Issue