update the duration column

calculate the duration in client