tfSntpUserRefresh
Table of Contents >> Application Reference >> Simple Network Time Protocol
#include <trsocket.h> |
int tfSntpUserRefresh | (ttSntpHandle sntpHandle); |
Function Description
(For unicast mode only.) Immediately poll a server for a time update. Polling Internet NTP servers faster than the designated polling interval is not good practice but tfSntpUserRefresh() is available if you have the need for a one-shot update.
If you need more frequent polling, consider setting TM_SNTP_OPT_MINPOLL, TM_SNTP_OPT_MINFIRST, TM_SNTP_OPT_MAXFIRST, TM_SNTP_OPT_BURST_TIME and TM_SNTP_OPT_BURST_COUNT via tfSntpUserSetOption().
If the association was created in blocking mode, tfSntpUserRefresh() will signal the task that is running tfSntpUserExecute() and return a TM_EINPROGRESS code to the caller. Function tfSntpUserExecute() sends the polling request.
If the association was created in non-blocking mode, tfSntpUserRefresh() will call tfSntpUserExecute() to send the polling request.
Parameters
- sntpHandle
- The SNTP client handle returned by tfSntpUserCreate().
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid handle.
- TM_EPERM
- Broadcast associations do not support polling.
- TM_ENOBUFS
- Not enough memory.
- TM_EINPROGRESS
- Operation started and is in progress.
Table of Contents >> Application Reference >> Simple Network Time Protocol