This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new 9cb9cea4b ntpclient/ntpclient.c: fix the NTP client’s timeval conversion bug from milliseconds to microseconds 9cb9cea4b is described below commit 9cb9cea4b23d70e7dcb18e2087858d016d536530 Author: nuttxs <zhaoqing.zh...@sony.com> AuthorDate: Mon Aug 11 17:17:26 2025 +0800 ntpclient/ntpclient.c: fix the NTP client’s timeval conversion bug from milliseconds to microseconds Signed-off-by: nuttxs <zhaoqing.zh...@sony.com> --- netutils/ntpclient/ntpclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netutils/ntpclient/ntpclient.c b/netutils/ntpclient/ntpclient.c index 66aaacb4a..19962f4d5 100644 --- a/netutils/ntpclient/ntpclient.c +++ b/netutils/ntpclient/ntpclient.c @@ -892,7 +892,7 @@ static int ntpc_create_dgram_socket(int domain) /* Setup a send timeout on the socket */ tv.tv_sec = CONFIG_NETUTILS_NTPCLIENT_TIMEOUT_MS / 1000; - tv.tv_usec = CONFIG_NETUTILS_NTPCLIENT_TIMEOUT_MS % 1000; + tv.tv_usec = (CONFIG_NETUTILS_NTPCLIENT_TIMEOUT_MS % 1000) * 1000; ret = setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(struct timeval)); if (ret < 0)