move 'double end_time' variable to if block for ESTIMATE_TIME_RUNNING_BLOCK_END macro