Changed when to res_time