2022-11-13 00:50:11 +00:00
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
2022-11-13 08:16:51 +00:00
|
|
|
class EnteWatch extends Stopwatch {
|
|
|
|
final String context;
|
|
|
|
|
|
|
|
EnteWatch(this.context) : super();
|
|
|
|
|
2022-11-13 00:50:11 +00:00
|
|
|
void log(String msg) {
|
2022-11-13 08:16:51 +00:00
|
|
|
debugPrint("[$context]: $msg took ${elapsed.inMilliseconds} ms");
|
2022-11-13 00:50:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void logAndReset(String msg) {
|
2022-11-13 08:16:51 +00:00
|
|
|
debugPrint("[$context]: $msg took ${elapsed.inMilliseconds} ms");
|
2022-11-13 00:50:11 +00:00
|
|
|
reset();
|
|
|
|
}
|
|
|
|
}
|