Commit before changing time duration algorthm