From 78f911ac1911e0ebdab3afd26683653d416c08f0 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Thu, 28 Aug 2014 06:42:00 +0200
Subject: Chrono: add methods IsZero(), IsPositive()

---
 src/Chrono.hxx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/Chrono.hxx b/src/Chrono.hxx
index 4c9fafe58..f20edaf59 100644
--- a/src/Chrono.hxx
+++ b/src/Chrono.hxx
@@ -73,6 +73,14 @@ public:
 	constexpr double ToDoubleS() const {
 		return double(count()) / 1000.;
 	};
+
+	constexpr bool IsZero() const {
+		return count() == 0;
+	}
+
+	constexpr bool IsPositive() const {
+		return count() > 0;
+	}
 };
 
 #endif
-- 
cgit v1.2.3