Dogs can tell time using their sense of smell. Your odor slowly dissipates as the day goes on. Then, when it reaches a low enough amount, your dog knows to expect you to come home.
Tidbit

Dogs can tell time using their sense of smell. Your odor slowly dissipates as the day goes on. Then, when it reaches a low enough amount, your dog knows to expect you to come home.