OLD | NEW |
---|---|
(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_ | |
OLD | NEW |