Bug 1004365 part 3b.1 - Add % operator to TimeDuration; r=froydnj

This commit is contained in:
Brian Birtles 2014-06-11 14:19:08 +09:00
parent 80c0d7b5c4
commit d3ea6b392e

View File

@ -129,6 +129,10 @@ public:
double operator/(const TimeDuration& aOther) const {
return static_cast<double>(mValue) / aOther.mValue;
}
TimeDuration operator%(const TimeDuration& aOther) const {
MOZ_ASSERT(aOther.mValue != 0, "Division by zero");
return TimeDuration::FromTicks(mValue % aOther.mValue);
}
bool operator<(const TimeDuration& aOther) const {
return mValue < aOther.mValue;