measureTime method

FutureOr<(T, int)> measureTime([
  1. String? debugName
])

测量方法执行耗时

Implementation

FutureOr<(T, int)> measureTime([String? debugName]) {
  final stopWatch = Stopwatch()..start();
  final res = this.call() as T;
  stopWatch.stop();
  return (res, stopWatch.elapsedMilliseconds);
}