Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: azure-iot-c-sdk-f767zi
Fork of samplemqtt by
NTPClient Class Reference
NTP Client to update the mbed's RTC using a remote time server. More...
#include <NTPClient.h>
Public Member Functions | |
| NTPClient (NetworkInterface *networkInterface) | |
| Instantiate the NTP client. | |
| NTPResult | setTime (const char *host, uint16_t port=NTP_DEFAULT_PORT, uint32_t timeout=NTP_DEFAULT_TIMEOUT) |
| Get current time (blocking) Update the time using the server host Blocks until completion. | |
Detailed Description
NTP Client to update the mbed's RTC using a remote time server.
Definition at line 46 of file NTPClient.h.
Constructor & Destructor Documentation
| NTPClient | ( | NetworkInterface * | networkInterface ) |
Instantiate the NTP client.
Definition at line 31 of file NTPClient.cpp.
Member Function Documentation
| NTPResult setTime | ( | const char * | host, |
| uint16_t | port = NTP_DEFAULT_PORT, |
||
| uint32_t | timeout = NTP_DEFAULT_TIMEOUT |
||
| ) |
Get current time (blocking) Update the time using the server host Blocks until completion.
- Parameters:
-
host NTP server IPv4 address or hostname (will be resolved via DNS) port port to use; defaults to 123 timeout waiting timeout in ms (osWaitForever for blocking function, not recommended)
- Returns:
- 0 on success, NTP error code (<0) on failure
Definition at line 36 of file NTPClient.cpp.
Generated on Sat Jul 16 2022 19:35:15 by
1.7.2
