--- daemontools-0.76/src/taia_now.c.bak 2001-07-12 19:49:49.000000000 +0300 +++ daemontools-0.76/src/taia_now.c 2007-08-29 19:32:48.256135506 +0300 @@ -2,14 +2,15 @@ #include #include -#include #include "taia.h" void taia_now(struct taia *t) { - struct timeval now; - gettimeofday(&now,(struct timezone *) 0); - tai_unix(&t->sec,now.tv_sec); - t->nano = 1000 * now.tv_usec + 500; + struct timespec now; + + clock_gettime(CLOCK_REALTIME, &now); + tai_unix(&t->sec, now.tv_sec); + t->nano = now.tv_nsec; t->atto = 0; } + --- daemontools-0.76/src/Makefile.bak 2001-07-12 19:49:49.000000000 +0300 +++ daemontools-0.76/src/Makefile 2007-08-29 19:52:54.525841540 +0300 @@ -206,7 +206,7 @@ matchtest.o: buffer.h compile match.h ma multilog: byte.a deepsleep.o load match.o multilog.o time.a \ timestamp.o unix.a - ./load multilog deepsleep.o timestamp.o match.o time.a unix.a byte.a + ./load multilog deepsleep.o timestamp.o match.o time.a unix.a byte.a -lrt multilog.o: alloc.h buffer.h byte.h coe.h compile deepsleep.h \ direntry.h env.h error.h fd.h lock.h match.h multilog.c open.h scan.h \ @@ -360,7 +360,7 @@ subgetopt.o: compile subgetopt.c subgeto ./compile subgetopt.c supervise: byte.a deepsleep.o load supervise.o time.a unix.a - ./load supervise deepsleep.o time.a unix.a byte.a + ./load supervise deepsleep.o time.a unix.a byte.a -lrt supervise.o: coe.h compile deepsleep.h env.h error.h fifo.h iopause.h \ lock.h ndelay.h open.h sig.h strerr.h supervise.c tai.h taia.h \ @@ -421,7 +421,7 @@ systype: find-systype.sh trycpp.c x86cpu sh find-systype.sh > systype tai64n: byte.a load tai64n.o time.a timestamp.o unix.a - ./load tai64n timestamp.o time.a unix.a byte.a + ./load tai64n timestamp.o time.a unix.a byte.a -lrt tai64n.o: buffer.h compile tai64n.c timestamp.h ./compile tai64n.c