Bug 1073379, part 1 - Add an AnimationUtils::DoubleToTimeDuration helper. r=birtles

This commit is contained in:
Jonathan Watt 2015-02-09 10:25:51 +00:00
parent a7f6ea8515
commit 69ac7e7f6d

View File

@ -26,6 +26,18 @@ public:
return result;
}
static Nullable<TimeDuration>
DoubleToTimeDuration(const Nullable<double>& aTime)
{
Nullable<TimeDuration> result;
if (!aTime.IsNull()) {
result.SetValue(TimeDuration::FromMilliseconds(aTime.Value()));
}
return result;
}
};
} // namespace dom