Add start time and end time update logic to share machine algorithm