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

Unified Diff: packages/charted/lib/core/timer.dart

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « packages/charted/lib/core/time_interval.dart ('k') | packages/charted/lib/core/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/charted/lib/core/timer.dart
diff --git a/packages/charted/lib/core/timer.dart b/packages/charted/lib/core/timer.dart
index a1666314b7c07137555cacb53a539b64a3f2d9a3..93856ddab9ccad2aa9ce4aa015c8f092fbc0d691 100644
--- a/packages/charted/lib/core/timer.dart
+++ b/packages/charted/lib/core/timer.dart
@@ -38,10 +38,10 @@ class AnimationTimer extends LinkedListEntry {
/// Schedule a new [callback] to be called [delay] micro-seconds after
/// [then] micro-seconds since epoch.
- AnimationTimer(this.callback, { int delay: 0, int then: null })
+ AnimationTimer(this.callback, {int delay: 0, int then: null})
: time = then == null
- ? new DateTime.now().millisecondsSinceEpoch + delay
- : then + delay {
+ ? new DateTime.now().millisecondsSinceEpoch + delay
+ : then + delay {
_queue.add(this);
if (!_animationFrameRequested) {
if (_timerScheduled != null) {
@@ -59,7 +59,7 @@ class AnimationTimer extends LinkedListEntry {
int earliest = null;
AnimationTimer timer = _queue.isEmpty ? null : _queue.first;
- while(timer != null) {
+ while (timer != null) {
bool finished = false;
AnimationTimer ref = timer;
@@ -83,15 +83,13 @@ class AnimationTimer extends LinkedListEntry {
if (delay == null) {
_animationFrameRequested = false;
- }
- else if (delay > 24) {
+ } else if (delay > 24) {
if (_timerScheduled != null) {
_timerScheduled.cancel();
}
_timerScheduled = new Timer(new Duration(milliseconds: delay), _step);
_animationFrameRequested = false;
- }
- else {
+ } else {
_animationFrameRequested = true;
window.animationFrame.then(_step);
}
« no previous file with comments | « packages/charted/lib/core/time_interval.dart ('k') | packages/charted/lib/core/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698