cancel method

void cancel()

Cancels this AwaitableTimer.

Implementation

void cancel() {
  try {
    _timer.cancel();
    _completer.complete();
  } on StateError {
    // [_completer]'s future is allowed to be competed at this point.
  }
}