mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1004365 part 3b.1 - Add % operator to TimeDuration; r=froydnj
This commit is contained in:
parent
80c0d7b5c4
commit
d3ea6b392e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user