about summary refs log tree commit diff
path: root/src/daemontools-extras
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-09-06 13:03:11 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-09-06 13:03:11 +0000
commit296cdd194fb36e4b080690f5f24228925722bf57 (patch)
tree497124e5faea03f6583aa1a2deb5e8953cf68aa8 /src/daemontools-extras
parent2f8e7b245b7fe187c41ea3655fce7551cfd7a48c (diff)
downloads6-296cdd194fb36e4b080690f5f24228925722bf57.tar.gz
s6-296cdd194fb36e4b080690f5f24228925722bf57.tar.xz
s6-296cdd194fb36e4b080690f5f24228925722bf57.zip
Adapt to new stopwatch API
Diffstat (limited to 'src/daemontools-extras')
-rw-r--r--src/daemontools-extras/s6-log.c4
-rw-r--r--src/daemontools-extras/s6-setlock.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c
index 5477298..8596879 100644
--- a/src/daemontools-extras/s6-log.c
+++ b/src/daemontools-extras/s6-log.c
@@ -1184,8 +1184,8 @@ int main (int argc, char const *const *argv)
   if (linelimit && linelimit < LINELIMIT_MIN) linelimit = LINELIMIT_MIN ;
   if (compat_gflags && verbosity) strerr_warnw1x("options -t and -e are deprecated") ;
   if (!fd_sanitize()) strerr_diefu1sys(111, "ensure stdin/stdout/stderr are open") ;
-  tain_now_set_stopwatch() ; /* only for timeouts; wallclock is used for timestamping */
-  if (!tain_now_g() && verbosity) strerr_warnwu1sys("read current time - timestamps may be wrong for a while") ;
+  if (!tain_now_set_stopwatch_g() && verbosity)
+    strerr_warnwu1sys("set monotonic clock and read current time - timestamps may be wrong for a while") ;
   if (ndelay_on(0) < 0) strerr_diefu3sys(111, "set std", "in", " non-blocking") ;
   if (ndelay_on(1) < 0) strerr_diefu3sys(111, "set std", "out", " non-blocking") ;
   script_firstpass(argv, &sellen, &actlen, &scriptlen, &gflags) ;
diff --git a/src/daemontools-extras/s6-setlock.c b/src/daemontools-extras/s6-setlock.c
index a07c0e4..83741ac 100644
--- a/src/daemontools-extras/s6-setlock.c
+++ b/src/daemontools-extras/s6-setlock.c
@@ -57,8 +57,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
     int p[2] = { 0, 1 } ;
     pid_t pid ;
     char c ;
-    tain_now_set_stopwatch() ;
-    tain_now_g() ;
+    tain_now_set_stopwatch_g() ;
     tain_from_millisecs(&deadline, timeout) ;
     tain_add_g(&deadline, &deadline) ;
     pid = child_spawn2(S6_LIBEXECPREFIX "s6lockd-helper", cargv, cenvp, p) ;