зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1004365 part 3b.1 - Add % operator to TimeDuration; r=froydnj
This commit is contained in:
Родитель
80c0d7b5c4
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче