wait function

Duration wait()

Implementation

Duration wait() {
  if (timer == null || !timer!.isActive) {
    timer = Timer(const Duration(microseconds: 120), () {
      duration = Duration.zero;
    });
  }
  return duration += const Duration(milliseconds: 100);
}