]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common: adding missing ceph::coarse_real_clock helpers
authorCasey Bodley <cbodley@redhat.com>
Tue, 14 Aug 2018 15:12:48 +0000 (11:12 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 7 Sep 2018 15:20:12 +0000 (11:20 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/ceph_time.h

index ebe0df458914ee703dad17891faec97acc1ff8ff..79f410095423bba666f153e9a6918ffb2b98152e 100644 (file)
@@ -181,6 +181,14 @@ namespace ceph {
        return from_timespec(ts);
       }
 
+      static bool is_zero(const time_point& t) {
+       return (t == time_point::min());
+      }
+
+      static time_point zero() {
+       return time_point::min();
+      }
+
       static time_t to_time_t(const time_point& t) noexcept {
        return duration_cast<seconds>(t.time_since_epoch()).count();
       }