From: Johannes Berg Date: Thu, 3 Dec 2009 13:28:03 +0000 (+0100) Subject: print time instead of useless text X-Git-Tag: v2.31-rc1~98^2~13^2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6217bea39d56404cebf09fe0084f867758d781ba;p=thirdparty%2Futil-linux.git print time instead of useless text --- diff --git a/rfkill.c b/rfkill.c index 21a0158577..216e6ac2a3 100644 --- a/rfkill.c +++ b/rfkill.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "rfkill.h" #include "core.h" @@ -19,6 +20,7 @@ static void rfkill_event(void) { struct rfkill_event event; + struct timeval tv; struct pollfd p; ssize_t len; int fd, n; @@ -54,9 +56,10 @@ static void rfkill_event(void) continue; } - printf("RFKILL event: idx %u type %u op %u soft %u hard %u\n", - event.idx, event.type, event.op, - event.soft, event.hard); + gettimeofday(&tv, NULL); + printf("%ld.%06u: idx %u type %u op %u soft %u hard %u\n", + (long) tv.tv_sec, (unsigned int) tv.tv_usec, + event.idx, event.type, event.op, event.soft, event.hard); fflush(stdout); }