Calculating turn time

logic added for calculating turn time