Stopped Wall Clock

Ben has a wall clock in his room, but he didn't wind it one day, so it stopped working. Later that day he left his house, walked to his best friend's place, who has his own, always precise clock, stayed there for a while, then walked back home. When he arrived, he went to his wall clock and adjusted it to show the correct time. How did Ben do it, if he didn't see any other clocks during the day, except for the one at his best friend's place?


Before Ben left his place, he winded his clock. When he went to his friend's place, he noted for how long he stayed there - say X, and at what time he left - say Y. After Ben got back home, he looked at his own wall clock and calculated the time he was outside - say Z. Then he concluded that the time he was walking was Z-X in total, and therefore it took him (Z-X)/2 time to get from his friend's place to his own house. He added Y (the time he left his friend's place) and got Y+(Z-X)/2 - the correct time.