]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
utime_t: add is_zero()
authorYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 7 Oct 2009 21:40:35 +0000 (14:40 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 7 Oct 2009 21:40:35 +0000 (14:40 -0700)
src/include/utime.h

index d813a4bb59ba9820e12090ba56939a802f054cba..1940362aa6654894dc6ab06982ce293920fc0ebf 100644 (file)
@@ -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);