Implement stopwatch in Dart