 He already existed. God exists in the past, present, and future all at the same time. He exists in one eternal now. He sees all of life at once. So he sees the end from the beginning. God created time and he controls it.