From 3bf149da09a15b80d327968980c0c9c7d531b87b Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 7 Oct 2009 14:40:35 -0700 Subject: [PATCH] utime_t: add is_zero() --- src/include/utime.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/include/utime.h b/src/include/utime.h index d813a4bb59ba9..1940362aa6654 100644 --- a/src/include/utime.h +++ b/src/include/utime.h @@ -44,6 +44,9 @@ public: friend class Clock; public: + bool is_zero() { + return (tv.tv_sec == 0) && (tv.tv_usec == 0); + } void normalize() { if (tv.tv_usec > 1000*1000) { tv.tv_sec += tv.tv_usec / (1000*1000); -- 2.39.5