timeAction function
Measures the amount of time action
takes.
Implementation
Duration timeAction(VoidCallback action) {
final Stopwatch stopwatch = Stopwatch()..start();
action();
stopwatch.stop();
return stopwatch.elapsed;
}
Measures the amount of time action
takes.
Duration timeAction(VoidCallback action) {
final Stopwatch stopwatch = Stopwatch()..start();
action();
stopwatch.stop();
return stopwatch.elapsed;
}