diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-09-04 11:26:52 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-09-04 11:26:52 +0000 |
commit | 9c5b811d182f77b67a0bb5cd5f4a33774304e1d4 (patch) | |
tree | 6a2a681054a1946d9f29ff079da54049ba9210d7 /src | |
parent | 649b8640a34261574a774020dbfb5ed419170de3 (diff) | |
download | s6-networking-9c5b811d182f77b67a0bb5cd5f4a33774304e1d4.tar.xz |
Use stopwatches and wallclocks where appropriate
Diffstat (limited to 'src')
-rw-r--r-- | src/clock/s6-taiclockd.c | 2 | ||||
-rw-r--r-- | src/conn-tools/s6-ident-client.c | 1 | ||||
-rw-r--r-- | src/conn-tools/s6-tcpclient.c | 1 | ||||
-rw-r--r-- | src/conn-tools/s6-tcpserver-access.c | 1 | ||||
-rw-r--r-- | src/conn-tools/s6-tlsc.c | 1 | ||||
-rw-r--r-- | src/conn-tools/s6-tlsd.c | 1 | ||||
-rw-r--r-- | src/minidentd/minidentd.c | 1 |
7 files changed, 7 insertions, 1 deletions
diff --git a/src/clock/s6-taiclockd.c b/src/clock/s6-taiclockd.c index 504c4fc..e76a9c5 100644 --- a/src/clock/s6-taiclockd.c +++ b/src/clock/s6-taiclockd.c @@ -46,7 +46,7 @@ int main (int argc, char const *const *argv) { tain_t now ; packet[0] = 's' ; - if (!tain_sysclock(&now)) strerr_diefu1sys(111, "tain_sysclock") ; + if (!tain_wallclock_read(&now)) strerr_diefu1sys(111, "tain_wallclock_read") ; tain_pack(packet + 4, &now) ; if (socket_send46(s, packet, r, &ip, port) < 0) strerr_warnwu1sys("socket_send") ; diff --git a/src/conn-tools/s6-ident-client.c b/src/conn-tools/s6-ident-client.c index 1d24904..fb88830 100644 --- a/src/conn-tools/s6-ident-client.c +++ b/src/conn-tools/s6-ident-client.c @@ -50,6 +50,7 @@ int main (int argc, char const *const *argv) if (ip46_is6(&ra) != ip46_is6(&la)) strerr_dief1x(100, "address family mismatch") ; + tain_now_set_stopwatch() ; tain_now_g() ; tain_add_g(&deadline, &deadline) ; diff --git a/src/conn-tools/s6-tcpclient.c b/src/conn-tools/s6-tcpclient.c index 5fdd7f0..3e42fd0 100644 --- a/src/conn-tools/s6-tcpclient.c +++ b/src/conn-tools/s6-tcpclient.c @@ -111,6 +111,7 @@ int main (int argc, char const *const *argv) #endif if (!uint160_scan(argv[1], &remoteport)) strerr_dief2x(100, "invalid port number: ", argv[1]) ; + tain_now_set_stopwatch() ; tain_now_g() ; if (flags.timeout) tain_addsec_g(&deadline, flags.timeout) ; else tain_add_g(&deadline, &tain_infinite_relative) ; diff --git a/src/conn-tools/s6-tcpserver-access.c b/src/conn-tools/s6-tcpserver-access.c index 80360e5..9b58b69 100644 --- a/src/conn-tools/s6-tcpserver-access.c +++ b/src/conn-tools/s6-tcpserver-access.c @@ -133,6 +133,7 @@ int main (int argc, char const *const *argv, char const *const *envp) if (socket_tcpnodelay(1) < 0) if (verbosity) strerr_warnwu1sys("socket_tcpnodelay") ; } + tain_now_set_stopwatch() ; tain_now_g() ; tain_add_g(&deadline, &tto) ; if (!buffer_timed_flush_g(buffer_1small, &deadline)) diff --git a/src/conn-tools/s6-tlsc.c b/src/conn-tools/s6-tlsc.c index cbac1eb..805cc7f 100644 --- a/src/conn-tools/s6-tlsc.c +++ b/src/conn-tools/s6-tlsc.c @@ -93,5 +93,6 @@ int main (int argc, char const *const *argv, char const *const *envp) if (x && !gid0_scan(x, &gid)) strerr_dieinvalid(100, "TLS_GID") ; } + tain_now_set_stopwatch() ; return s6tlsc(argv, envp, &tto, preoptions, options, uid, gid, verbosity, servername, fds) ; } diff --git a/src/conn-tools/s6-tlsd.c b/src/conn-tools/s6-tlsd.c index 6746fa3..d70d2c7 100644 --- a/src/conn-tools/s6-tlsd.c +++ b/src/conn-tools/s6-tlsd.c @@ -75,5 +75,6 @@ int main (int argc, char const *const *argv, char const *const *envp) if (x && !gid0_scan(x, &gid)) strerr_dieinvalid(100, "TLS_GID") ; } + tain_now_set_stopwatch() ; return s6tlsd(argv, envp, &tto, preoptions, options, uid, gid, verbosity) ; } diff --git a/src/minidentd/minidentd.c b/src/minidentd/minidentd.c index 67ce7eb..9b13285 100644 --- a/src/minidentd/minidentd.c +++ b/src/minidentd/minidentd.c @@ -252,6 +252,7 @@ int main (int argc, char const *const *argv, char const *const *envp) if (!random_init()) strerr_diefu1sys(111, "init random generator") ; + tain_now_set_stopwatch() ; tain_now_g() ; for (;;) |