# setSubscriptionDuration method

Future<void> setSubscriptionDuration(

1. Duration duration

)

Sets the frequency at which duration updates are sent to duration listeners.

## Parameter

- duration is the wanted elapse time.Zero means "no callbacks". The default is zero. So don't forget to call this verb if you really want callbacks!

## See also

- onProgress
- getSubscriptionDuration()

## Implementation

    Future<void> setSubscriptionDuration(Duration duration) async {
      _logger.d('FS:---> setSubscriptionDuration ');
      await _waitOpen();
      if (_isInited != Initialized.fullyInitialized) {
        throw Exception('Recorder is not open');
      }
      await FlutterSoundRecorderPlatform.instance.setSubscriptionDuration(
        this,
        duration: duration,
      );
      _subscriptionDuration = duration;
      _logger.d('FS:<--- setSubscriptionDuration ');
    }