Time startup sync

This commit is contained in:
Ming Ming 2022-08-05 16:42:40 +08:00
parent 8f340da473
commit 8915ddf002

View file

@ -41,6 +41,7 @@ class StartupSync {
Future<SyncResult> call(Account account) async {
_log.info("[_run] Begin sync");
final stopwatch = Stopwatch()..start();
late final int syncFavoriteCount;
try {
syncFavoriteCount = await SyncFavorite(_c)(account);
@ -48,6 +49,7 @@ class StartupSync {
_log.shout("[_run] Failed while SyncFavorite", e, stackTrace);
syncFavoriteCount = -1;
}
_log.info("[_run] Elapsed time: ${stopwatch.elapsedMilliseconds}ms");
return SyncResult(syncFavoriteCount);
}