add function to write duration of time entry