logCompletionTime method
Logs the time taken to complete an operation.
This method calculates the time difference between the provided startTime
and the current time.
It then logs the completion time of the operation in milliseconds.
startTime
: The time the operation started.
operation
: A description of the operation being logged.
Implementation
@override
void logCompletionTime(DateTime startTime, String operation) {
// Calculate the duration in milliseconds
final duration = DateTime.now().difference(startTime).inMilliseconds;
// Log the completion time with the operation name and duration
log('$operation completed in $duration ms');
}