diff options
author | behara.ms <behara.ms@samsung.com> | 2014-11-18 08:01:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-18 16:02:45 +0000 |
commit | 591d77f964eae64a49bd83910bae574e40f20c1a (patch) | |
tree | 66282b31c16baa66f4ce07077ad7954f4d9b1c3d /cc/base | |
parent | ed1dafa7db5fcd150a757d1237c83a81666ec47f (diff) | |
download | chromium_src-591d77f964eae64a49bd83910bae574e40f20c1a.zip chromium_src-591d77f964eae64a49bd83910bae574e40f20c1a.tar.gz chromium_src-591d77f964eae64a49bd83910bae574e40f20c1a.tar.bz2 |
Make Keyframe use TimeTicks/TimeDelta to represent time instead of double.
BUG=178171
Review URL: https://codereview.chromium.org/719453007
Cr-Commit-Position: refs/heads/master@{#304612}
Diffstat (limited to 'cc/base')
-rw-r--r-- | cc/base/time_util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/base/time_util.h b/cc/base/time_util.h index dc07e74..06682c2 100644 --- a/cc/base/time_util.h +++ b/cc/base/time_util.h @@ -18,6 +18,11 @@ class CC_EXPORT TimeUtil { static_cast<double>(time_delta.ToInternalValue()) * value)); } + static double Divide(base::TimeDelta dividend, base::TimeDelta divisor) { + return static_cast<double>(dividend.ToInternalValue()) / + static_cast<double>(divisor.ToInternalValue()); + } + static base::TimeDelta Mod(base::TimeDelta dividend, base::TimeDelta divisor) { return base::TimeDelta::FromInternalValue(dividend.ToInternalValue() % |