Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: cc/base/time_util.h

Issue 693883004: Make cc::animation::TrimTimeToCurrentIteration,cc::AnimationCurve::Duration use TimeTicks/TimeDelta (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_BASE_TIME_UTIL_H_
6 #define CC_BASE_TIME_UTIL_H_
7
8 namespace base {
9 class TimeDelta;
10 }
11
12 namespace cc {
13
ajuma 2014/11/07 15:58:00 Please define a TimeUtil class and make these func
patro 2014/11/10 09:46:52 Done.
14 static base::TimeDelta Scale(const base::TimeDelta time_delta, double value) {
ajuma 2014/11/07 15:58:00 I assume you meant "const base::TimeDelta&"? A Tim
patro 2014/11/10 09:46:52 Done.
15 return base::TimeDelta::FromInternalValue(static_cast<int64>(
16 static_cast<double>(time_delta.ToInternalValue()) * value));
17 }
18
19 static base::TimeDelta Mod(const base::TimeDelta dividend,
20 const base::TimeDelta divisor) {
ajuma 2014/11/07 15:58:00 Same comment as above, please remove the consts he
patro 2014/11/10 09:46:52 Done.
21 return base::TimeDelta::FromInternalValue(dividend.ToInternalValue() %
22 divisor.ToInternalValue());
23 }
24
25 } // namespace cc
26
27 #endif // CC_BASE_TIME_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698