Added a SetRemainingTime function