summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-09-04 00:42:57 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-09-04 00:42:57 +0000
commit78e13b1041f9dfab3077c5e713d570089459094e (patch)
treed11ca572f031bad3feaccc47529a6b85e66af291
parent11cda7116509329b0c918925b7cac4081313f6f1 (diff)
downloadutmps-78e13b1041f9dfab3077c5e713d570089459094e.tar.xz
Move to stopwatch/wallclock where appropriate
-rw-r--r--src/utmps/logwtmp.c2
-rw-r--r--src/utmps/utmps-utmpd.c1
-rw-r--r--src/utmps/utmps-wtmpd.c1
3 files changed, 3 insertions, 1 deletions
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) ;