--- libowfat-0.29/taia/taia_now.c.nano 2003-11-06 22:47:59.000000000 +0200 +++ libowfat-0.29/taia/taia_now.c 2014-01-24 16:06:16.878238382 +0200 @@ -1,5 +1,7 @@ #include #include +#include + #include "taia.h" #ifdef __MINGW32__ #include @@ -20,10 +22,10 @@ void taia_now(struct taia *t) t->nano=((fnord.l+5)/10)%1000000; t->atto=0; #else - 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; #endif }