elapsedMilliseconds method

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

Returns total elapsed milliseconds for ref.

Implementation

int elapsedMilliseconds({String? ref}) {
  ref ??= currentReference;
  if (_stopwatches.containsKey(ref)) {
    return (_accumulatedTime[ref]! * 1000) +
        (_stopwatches[ref]!.isRunning ? _stopwatches[ref]!.elapsed.inMilliseconds : 0);
  }
  return 0;
}