From f3bc36589bd2e7655072fcd72c0d62c38e652b83 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 2 Mar 2016 22:25:15 -0800 Subject: [PATCH] common/ceph_time: add real_clock::is_zero() to check whether time is not zero Signed-off-by: Yehuda Sadeh Signed-off-by: Matt Benjamin --- src/common/ceph_time.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/ceph_time.h b/src/common/ceph_time.h index f0e188f97da4d..ef187c0a83f4b 100644 --- a/src/common/ceph_time.h +++ b/src/common/ceph_time.h @@ -75,6 +75,10 @@ namespace ceph { // introducing configurable clock skew. static time_point now(const CephContext* cct) noexcept; + static bool is_zero(const time_point& t) { + return (t == time_point::min()); + } + // Allow conversion to/from any clock with the same interface as // std::chrono::system_clock) template -- 2.39.5