From 78e13b1041f9dfab3077c5e713d570089459094e Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 4 Sep 2019 00:42:57 +0000 Subject: Move to stopwatch/wallclock where appropriate --- src/utmps/logwtmp.c | 2 +- src/utmps/utmps-utmpd.c | 1 + src/utmps/utmps-wtmpd.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/utmps/logwtmp.c b/src/utmps/logwtmp.c index e50b68d..83cd177 100644 --- a/src/utmps/logwtmp.c +++ b/src/utmps/logwtmp.c @@ -15,7 +15,7 @@ void logwtmp (char const *line, char const *name, char const *host) b.ut_pid = getpid() ; { tain_t now ; - tain_now(&now) ; + tain_wallclock_read(&now) ; timeval_from_tain(&b.ut_tv, &now) ; } updwtmpx("", &b) ; diff --git a/src/utmps/utmps-utmpd.c b/src/utmps/utmps-utmpd.c index 831ee68..7e2c3af 100644 --- a/src/utmps/utmps-utmpd.c +++ b/src/utmps/utmps-utmpd.c @@ -236,6 +236,7 @@ int main (void) if (!x) strerr_diefu1x(100, "get $IPCREMOTEEGID from environment") ; if (!gid0_scan(x, &gid)) strerr_dieinvalid(100, "IPCREMOTEEGID") ; if (ndelay_on(0) < 0) strerr_diefu1sys(111, "set stdin non-blocking") ; + tain_now_set_stopwatch() ; tain_now_g() ; for (;;) diff --git a/src/utmps/utmps-wtmpd.c b/src/utmps/utmps-wtmpd.c index c08237a..c5454a0 100644 --- a/src/utmps/utmps-wtmpd.c +++ b/src/utmps/utmps-wtmpd.c @@ -39,6 +39,7 @@ int main (void) if (!x) strerr_diefu1x(100, "get $IPCREMOTEEUID from environment") ; if (!uid0_scan(x, &uid)) strerr_dieinvalid(100, "IPCREMOTEEUID") ; if (ndelay_on(0) < 0) strerr_diefu1sys(111, "set stdin non-blocking") ; + tain_now_set_stopwatch() ; tain_now_g() ; tain_ulong(&deadline, 30) ; tain_add_g(&deadline, &deadline) ; -- cgit v1.2.3