Record start and end time