[Git][NTPsec/ntpsec][master] 2 commits: From microsecond to nanosecond timescale.

Eric S. Raymond gitlab at mg.gitlab.com
Sun Oct 2 13:57:46 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
ab875a03 by Eric S. Raymond at 2016-10-02T09:56:52-04:00
>From microsecond to nanosecond timescale.

- - - - -
2caebf17 by Eric S. Raymond at 2016-10-02T09:57:04-04:00
Typo fix.

- - - - -


2 changed files:

- libntp/systime.c
- ntpd/ntpd.c


Changes:

=====================================
libntp/systime.c
=====================================
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -254,7 +254,7 @@ adj_systime(
 	bool	isneg = false;
 
 	/*
-	 * FIXME: With the legacy Windows port on, this might be removable.
+	 * FIXME: With the legacy Windows port gone, this might be removable.
 	 * See also the related FIXME comment in ntpd/ntp_loopfilter.c.
 	 *
 	 * The Windows port adj_systime() depended on being called each


=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -1082,7 +1082,7 @@ wait_child_sync_if(
 	time_t	cur_time;
 	time_t	wait_rem;
 	fd_set	readset;
-	struct timeval wtimeout;
+	struct timespec wtimeout;
 
 	if (0 == wait_sync) 
 		return 0;
@@ -1096,11 +1096,11 @@ wait_child_sync_if(
 				? (wait_end_time - cur_time)
 				: 0;
 		wtimeout.tv_sec = wait_rem;
-		wtimeout.tv_usec = 0;
+		wtimeout.tv_nsec = 0;
 		FD_ZERO(&readset);
 		FD_SET(pipe_read_fd, &readset);
-		rc = select(pipe_read_fd + 1, &readset, NULL, NULL,
-			    &wtimeout);
+		rc = pselect(pipe_read_fd + 1, &readset, NULL, NULL,
+			     &wtimeout, NULL);
 		if (-1 == rc) {
 			if (EINTR == errno)
 				continue;
@@ -1119,9 +1119,9 @@ wait_child_sync_if(
 			FD_ZERO(&readset);
 			FD_SET(pipe_read_fd, &readset);
 			wtimeout.tv_sec = 0;
-			wtimeout.tv_usec = 0;
-			rc = select(pipe_read_fd + 1, &readset, NULL,
-				    NULL, &wtimeout);
+			wtimeout.tv_nsec = 0;
+			rc = pselect(pipe_read_fd + 1, &readset, NULL,
+				     NULL, &wtimeout, NULL);
 			if (0 == rc)	/* select() timeout */
 				break;
 			else		/* readable */



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/a5814c31bc01e1f46555c000ee505a5267ac90a8...2caebf17c42b78f30d01ef5fb9e10427f3c66015
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161002/c24c02ec/attachment.html>


More information about the vc mailing list