Adaptive temporal refinement in injection molding