From 8005ac2c64181388c1a4d749094dd9d031b47528 Mon Sep 17 00:00:00 2001 From: Kees van Reeuwijk Date: Wed, 14 Apr 2010 17:51:39 +0000 Subject: [PATCH] Add timerisclear() macro. --- include/sys/time.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/sys/time.h b/include/sys/time.h index d295f8676..00bb13235 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -19,6 +19,10 @@ struct timezone { int tz_dsttime; /* type of dst correction */ }; +/* Operations on timevals. */ +#define timerclear(tp) (tp)->tv_sec = (tp)->tv_usec = 0L +#define timerisset(tp) ((tp)->tv_sec || (tp)->tv_usec) + int gettimeofday(struct timeval *_RESTRICT tp, void *_RESTRICT tzp); /* Compatibility with other Unix systems */