endTrace method Null safety

void endTrace()

Ends timing of an execution block, calculates elapsed time and records the associated trace.