schedulePeriodic method
Schedules a callback
to be executed periodically every duration
.
Implementation
@override
Disposable schedulePeriodic(
Duration duration, Callback1<Disposable> callback) {
final subscription = StatefulDisposable();
do {
_busyWaitUntil(now.add(duration));
callback(subscription);
} while (!subscription.isDisposed);
return subscription;
}