Inheritance of cell-cycle duration in the presence of periodic forcing