finish method
Finish the timer, calculate the elapsed time, and send the information to analytics. Once this is called, any future invocations are no-ops.
Implementation
Future<void> finish() {
if (_endMillis != null) return Future.value();
_endMillis = DateTime.now().millisecondsSinceEpoch;
return analytics.sendTiming(variableName, currentElapsedMillis,
category: category, label: label);
}