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 | |
14 class CC_EXPORT TimeUtil { | |
15 public: | |
16 static base::TimeDelta Scale(base::TimeDelta time_delta, double value) { | |
17 return base::TimeDelta::FromInternalValue(static_cast<int64>( | |
18 static_cast<double>(time_delta.ToInternalValue()) * value)); | |
19 } | |
ajuma
2014/11/10 14:32:42
Please add a blank line between these functions.
patro
2014/11/12 04:09:12
Done.
| |
20 static base::TimeDelta Mod(base::TimeDelta dividend, | |
21 base::TimeDelta divisor) { | |
22 return base::TimeDelta::FromInternalValue(dividend.ToInternalValue() % | |
23 divisor.ToInternalValue()); | |
24 } | |
25 }; | |
26 | |
27 } // namespace cc | |
28 | |
29 #endif // CC_BASE_TIME_UTIL_H_ | |
OLD | NEW |