From: Kees van Reeuwijk Date: Wed, 14 Apr 2010 17:51:39 +0000 (+0000) Subject: Add timerisclear() macro. X-Git-Tag: v3.1.7~142 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/soc.html?a=commitdiff_plain;h=8005ac2c64181388c1a4d749094dd9d031b47528;p=minix.git Add timerisclear() macro. --- 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 */