Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: samples/chat/chat_server_lib.dart

Issue 10538105: Make isUtc a getter, change some method names in Date. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: samples/chat/chat_server_lib.dart
diff --git a/samples/chat/chat_server_lib.dart b/samples/chat/chat_server_lib.dart
index 05b466e90d3f036a74901b7b3f1074367bf92804..9592b60bc49f2efe3391fc67a500c6faff191145 100644
--- a/samples/chat/chat_server_lib.dart
+++ b/samples/chat/chat_server_lib.dart
@@ -635,7 +635,7 @@ class Rate {
: _timeRange = timeRange,
_buckets = new List(buckets + 1), // Current bucket is not in the sum.
_currentBucket = 0,
- _currentBucketTime = new Date.now().value,
+ _currentBucketTime = new Date.now().millisecondsSinceEpoch,
_sum = 0 {
_bucketTimeRange = (_timeRange / buckets).toInt();
for (int i = 0; i < _buckets.length; i++) {
@@ -660,7 +660,7 @@ class Rate {
// matching the current time. Subtract all buckets vacated from the
// sum as bucket for current time is located.
void _timePassed() {
- int time = new Date.now().value;
+ int time = new Date.now().millisecondsSinceEpoch;
if (time < _currentBucketTime + _bucketTimeRange) {
// Still same bucket.
return;

Powered by Google App Engine
This is Rietveld 408576698