what is the relationship between distance and time