add time_cost_template with c