totalTime static method
Total time spent across all sessions.
Implementation
static Future<Duration> totalTime() async {
final records = await getHistory();
var totalSeconds = 0;
for (final r in records) {
totalSeconds += r.elapsedSeconds;
}
return Duration(seconds: totalSeconds);
}