<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def end_timing(self):
 """ Ends timing of an execution block, calculates elapsed time and updates the associated counter. """


        if self._callback != None:
            elapsed = time.perf_counter() * 1000 - self._start
            self._callback.end_timing(self._counter, elapsed)