Index: base/time/time.h |
diff --git a/base/time/time.h b/base/time/time.h |
index 18de085e341714b85efe6e10a988835601bf998e..6d618614aef3ed7574f3f279c37805356d935067 100644 |
--- a/base/time/time.h |
+++ b/base/time/time.h |
@@ -178,6 +178,14 @@ class BASE_EXPORT TimeDelta { |
return delta_ / a.delta_; |
} |
+ // Multiplicative computations with floats. |
+ TimeDelta multiply_by(double a) const { |
rvargas (doing something else)
2015/02/20 21:49:42
I know that in general we prefer named methods ove
michaeln
2015/02/20 22:18:04
i initially tried it with operators but adding an
rvargas (doing something else)
2015/02/20 22:44:56
hmmm, how about
template<typename T>
TimeDelt
|
+ return TimeDelta(delta_ * a); |
+ } |
+ TimeDelta divide_by(double a) const { |
+ return TimeDelta(delta_ / a); |
+ } |
+ |
// Defined below because it depends on the definition of the other classes. |
Time operator+(Time t) const; |
TimeTicks operator+(TimeTicks t) const; |