From: Yehuda Sadeh Date: Thu, 3 Mar 2016 06:25:15 +0000 (-0800) Subject: common/ceph_time: add real_clock::is_zero() X-Git-Tag: v10.1.0~73^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f3bc36589bd2e7655072fcd72c0d62c38e652b83;p=ceph.git 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 --- diff --git a/src/common/ceph_time.h b/src/common/ceph_time.h index f0e188f97da4..ef187c0a83f4 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