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

Unified 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: Addressed review comments. Created 7 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
« no previous file with comments | « sdk/lib/_internal/lib/isolate_helper.dart ('k') | sdk/lib/async/zone.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/timer.dart
diff --git a/sdk/lib/async/timer.dart b/sdk/lib/async/timer.dart
index 3544728ece9ad5f242f97da7d80a2104ca8e89a9..ff7b07ed5bdb8a2568038769c2b5d064b1f66c24 100644
--- a/sdk/lib/async/timer.dart
+++ b/sdk/lib/async/timer.dart
@@ -57,6 +57,16 @@ abstract class Timer {
* Cancels the timer.
*/
void cancel();
+
+ /**
+ * Returns whether the timer is still active.
+ *
+ * A non-periodic timer is active if the callback has not been executed,
+ * and the timer has not been canceled.
+ *
+ * A periodic timer is active if it has not been canceled.
+ */
+ bool get isActive;
}
external Timer _createTimer(Duration duration, void callback());
« no previous file with comments | « sdk/lib/_internal/lib/isolate_helper.dart ('k') | sdk/lib/async/zone.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698