Commit 78f911ac authored by Max Kellermann's avatar Max Kellermann

Chrono: add methods IsZero(), IsPositive()

parent 0f2a7226
...@@ -73,6 +73,14 @@ public: ...@@ -73,6 +73,14 @@ public:
constexpr double ToDoubleS() const { constexpr double ToDoubleS() const {
return double(count()) / 1000.; return double(count()) / 1000.;
}; };
constexpr bool IsZero() const {
return count() == 0;
}
constexpr bool IsPositive() const {
return count() > 0;
}
}; };
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment