God created Time. God interacts with Time though isn't bound by it in and of itself though he operates by the rules of time is above it as well. I would think God has this own space time continum. (Pardon the Star Trek Theology interaction)
Therefore since God created Time; knows the time - and interacts with it - He may know what happens in the End of Time but ultimately allows things to play out within Time but may interrupt it as it accomplishes His Will. God's Foreknowledge is He knows all things - is involved with Things but allows Time to be tested as well.
Example: No One But the Father Knows when the Son is to Return. God gives us FREE Will; but also knowing WHO God is .... predestination is a Biblical Term - though differently understood than that of the Calvinism theology. Anyways I'm rambling.
As this deals with prayer - I think there are times when God interacts and can change His mind in answer to prayer. There seems to be some scriptural examples of this. Jonah. Abraham dealing with God in saving Lot. And then there seems to be hardening of hearts as well Example: Pharoah.
Prayer in its simple form is communication with God. The Holy Spirit seems to groan on our behalf. And with this communication comes God communicating with us as well.