this is something that we will struggle to understand because we are so finite in our thinking and our understanding.
c.s. lewis answered it for me. obviously god is outside of time right? time is really a tunnel we are stuck in, but its not the whole picture.
picture it like this u have a piece of paper, with a small line drawn on it. this line is the tunnel we are trapped in. we must move along the line, going nowhere else. however god is in the whole paper, not just the line. so he sees the whole line at once. so its not that he knows what your gonna do 