timeAsyncOperation function
Times the specified asynchronous operation.
Implementation
Future<Duration> timeAsyncOperation(Future<void> Function() operation) async {
var stopwatch = Stopwatch()..start();
await operation();
return stopwatch.elapsed;
}