reset method

  1. @override
Future<void> reset()
override

Resets the counter value to zero and updates the last update time to now.

This operation is synchronized to ensure thread safety.

Implementation

@override
Future<void> reset() => _lock.synchronized(() async {
      await Future.wait([
        value.set(0),
        lastUpdate.set(DateTime.now()),
      ]);
    });