Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
fix(mock): Timer.isActive should be false after running callback
Browse files Browse the repository at this point in the history
For non-periodic timers, isActive should be false after running the timer function.

https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-async.Timer#id_isActive
  • Loading branch information
chirayuk committed Aug 18, 2014
1 parent 4b6c45e commit 75d4064
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/mock/zone.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ void clockTick({int days: 0,
if (spec.duration <= Duration.ZERO) {
microLeap();
spec.fn();
spec.isActive = false;
} else {
remainingTimers.add(spec);
}
Expand Down

0 comments on commit 75d4064

Please sign in to comment.