endTiming method Null safety

void endTiming()

Ends timing of an execution block, calculates elapsed time and updates the associated counter.