God Created Everything According to a Fixed Decree

We have created all things according to a fixed decree. (Sura al-Qamar: 49)

Destiny is part of God's perfect creation and all events, past and future, are known to Him as in a timeless "single moment."
It is God Who created matter. What we call time is the motion of matter. Time is a dimension which is relative only to man. Only man perceives the passage of time; a human being can recognize his own existence only as it exists in time. God, however, is not bound by time, for it is He Who created it. In other words, God is independent of the flow of time; God does not need to wait to see what will happen in the future. God is truly exalted above all such deficiencies. God knows of a future event (future for us) before it happens, because God, the First and the Last, is not bound by time, and because He is the Absolute and the Infinite. Not bound by time, God is aware of an event which, from our perspective, will take place thousands of years later. In fact, it is He Who willed, determined and created it. This truth is revealed in a verse as follows:

Nothing occurs, either in the earth or in yourselves, without its being in a Book before We make it happen. That is something easy for God. (Sura al-Hadid: 22)