[Git][NTPsec/ntpsec][master] Replace deprecated usleep(3) with POSIX-compliant nanosleep(2).
Eric S. Raymond
gitlab at mg.gitlab.com
Sun Aug 13 14:43:37 UTC 2017
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
9c14507c by Eric S. Raymond at 2017-08-13T10:43:17-04:00
Replace deprecated usleep(3) with POSIX-compliant nanosleep(2).
- - - - -
1 changed file:
- ntpfrob/pps-api.c
Changes:
=====================================
ntpfrob/pps-api.c
=====================================
--- a/ntpfrob/pps-api.c
+++ b/ntpfrob/pps-api.c
@@ -116,7 +116,9 @@ void ppscheck(const char *device)
err(1, "time_pps_fetch");
if (olda == pi.assert_sequence &&
oldc == pi.clear_sequence) {
- usleep(10000);
+ /* used to be usleep(10000) - 0.1 sec */
+ const struct timespec tenth = {0, 100000};
+ nanosleep(&tenth, NULL);
continue;
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9c14507c819eed1f18550d53ed71a69c5e665017
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9c14507c819eed1f18550d53ed71a69c5e665017
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170813/6664e6e4/attachment.html>
More information about the vc
mailing list