Chromium Code Reviews| Index: media/base/moving_average.h |
| diff --git a/media/base/moving_average.h b/media/base/moving_average.h |
| index 18a934e2998cb919a0dc39a21efff43562ccf3e1..b1d647776ce7577f49019a05bd4893bab386795b 100644 |
| --- a/media/base/moving_average.h |
| +++ b/media/base/moving_average.h |
| @@ -26,6 +26,9 @@ class MEDIA_EXPORT MovingAverage { |
| // Returns the current average of all held samples. |
| base::TimeDelta Average() const; |
| + // Returns the standard deviation of all held samples. |
| + base::TimeDelta Deviation() const; |
| + |
| // Resets the state of the class to its initial post-construction state. |
| void Reset(); |
| @@ -40,6 +43,7 @@ class MEDIA_EXPORT MovingAverage { |
| std::vector<base::TimeDelta> samples_; |
| base::TimeDelta total_; |
| + double square_sum_ms_; |
|
DaleCurtis
2015/11/20 23:50:46
Store as base::TimeDelta
qiangchen
2015/11/25 18:06:33
Probably may not be a good idea.
As the unit is
|
| DISALLOW_COPY_AND_ASSIGN(MovingAverage); |
| }; |