]> Zhao Yanbai Git Server - minix.git/commitdiff
Add timerisclear() macro.
authorKees van Reeuwijk <reeuwijk@few.vu.nl>
Wed, 14 Apr 2010 17:51:39 +0000 (17:51 +0000)
committerKees van Reeuwijk <reeuwijk@few.vu.nl>
Wed, 14 Apr 2010 17:51:39 +0000 (17:51 +0000)
include/sys/time.h

index d295f8676f9069e7cb901781c627d1c379f042a5..00bb13235f353be3806428a3c411bfcf55a26d58 100644 (file)
@@ -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 */