This is a proposed fix for T51450.
I added a new end_time variable in the Progress class, which is updated when the render status is set to "Done." Progress::get_time now reads from end_time if the render is complete, instead of always calling time_dt.
I also noticed that the internal blender render would keep updating the time forever when rendering in the view port. So I added an update_flag check in render_view3d_startjob to re-init the render whenever the 3D view updates.