1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_AnimationUtils_h
7 #define mozilla_dom_AnimationUtils_h
9 #include "mozilla/TimeStamp.h"
10 #include "mozilla/dom/Nullable.h"
18 static Nullable
<double>
19 TimeDurationToDouble(const Nullable
<TimeDuration
>& aTime
)
21 Nullable
<double> result
;
23 if (!aTime
.IsNull()) {
24 result
.SetValue(aTime
.Value().ToMilliseconds());
32 } // namespace mozilla