Chromium Code Reviews| Index: samples/chat/chat_server_lib.dart |
| diff --git a/samples/chat/chat_server_lib.dart b/samples/chat/chat_server_lib.dart |
| index 7bbf55242fbbacbc2556ef33318a423de1849543..d60ab8edfa7b76ff57bbfc780b045726f6c3fdc8 100644 |
| --- a/samples/chat/chat_server_lib.dart |
| +++ b/samples/chat/chat_server_lib.dart |
| @@ -643,7 +643,7 @@ class Rate { |
| _currentBucket = 0, |
| _currentBucketTime = new Date.now().millisecondsSinceEpoch, |
| _sum = 0 { |
| - _bucketTimeRange = (_timeRange / buckets).toInt(); |
| + _bucketTimeRange = (_timeRange / buckets).truncate(); |
|
Lasse Reichstein Nielsen
2013/01/04 10:29:42
What happens if _timeRange is negative?
This shoul
|
| for (int i = 0; i < _buckets.length; i++) { |
| _buckets[i] = 0; |
| } |