Stopwatch stopwatch = new Stopwatch()..start(); doSomething(); print('doSomething() executed in ${stopwatch.elapsed}');