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

Side by Side Diff: sdk/lib/async/timer.dart

Issue 18325006: Add isActive field on Timer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.async; 5 part of dart.async;
6 6
7 abstract class Timer { 7 abstract class Timer {
8 8
9 /** 9 /**
10 * Creates a new timer. 10 * Creates a new timer.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 * This function is equivalent to `new Timer(Duration.ZERO, callback)`. 50 * This function is equivalent to `new Timer(Duration.ZERO, callback)`.
51 */ 51 */
52 static void run(void callback()) { 52 static void run(void callback()) {
53 new Timer(Duration.ZERO, callback); 53 new Timer(Duration.ZERO, callback);
54 } 54 }
55 55
56 /** 56 /**
57 * Cancels the timer. 57 * Cancels the timer.
58 */ 58 */
59 void cancel(); 59 void cancel();
60
61 /**
62 * Returns true if the timer is not done, that is it will run the callback.
floitsch 2013/07/01 12:49:43 Returns whether the timer is still active. A non-
zarah 2013/07/01 16:15:35 Done.
63 */
64 bool get isActive;
60 } 65 }
61 66
62 external Timer _createTimer(Duration duration, void callback()); 67 external Timer _createTimer(Duration duration, void callback());
63 external Timer _createPeriodicTimer(Duration duration, 68 external Timer _createPeriodicTimer(Duration duration,
64 void callback(Timer timer)); 69 void callback(Timer timer));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698