Add method for calculating distance based on time.