stop method

int stop({
  1. String? ref,
})

Detiene el stopwatch para ref (pausándolo si está corriendo) y devuelve el tiempo total

Implementation

int stop({String? ref}) {
  ref ??= currentReference;
  if (_stopwatches.containsKey(ref)) {
    if (_stopwatches[ref]!.isRunning) {
      pause(ref);
    }
    AppConfig.logger.i('Stopwatch detenido para $ref; tiempo total: ${_accumulatedTime[ref]} s.');
    return _accumulatedTime[ref]!;
  }
  return 0;
}