An engineer travels by train every day to his job at a factory in the neighboring city. When he arrives at the final station, there is a car that takes him to the factory. One day, he decides to leave home earlier and arrives at the final station an hour earlier than usual. Since the car had not yet arrived, he decides to walk to the factory. Because of this, he meets the car on the way, which picks him up and takes him to the factory. That day, the engineer arrives 10 minutes earlier at the factory. How long did the engineer walk?