Chrono: add methods IsZero(), IsPositive()

This commit is contained in:
Max Kellermann 2014-08-28 06:42:00 +02:00
parent 0f2a7226fb
commit 78f911ac19

View File

@ -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