ente/lib/extensions/stop_watch.dart
2022-11-13 14:00:30 +05:30

17 lines
364 B
Dart

import 'package:flutter/foundation.dart';
class EnteWatch extends Stopwatch {
final String context;
EnteWatch(this.context) : super();
void log(String msg) {
debugPrint("[$context]: $msg took ${elapsed.inMilliseconds} ms");
}
void logAndReset(String msg) {
debugPrint("[$context]: $msg took ${elapsed.inMilliseconds} ms");
reset();
}
}