Do not fret because of him who prospers in his way,
Because of the man who brings wicked schemes to pass.
Cease from anger, and forsake wrath;
Do not fret--it only causes harm."
Psalm 37:7-8 NKJV
Ever wonder why God oftentimes answers our prayers telling us either "no" or "wait", when, with all our understanding, it seems to be what's best? Sometimes it can be a bit discouraging and even frustrating to wait while it seems nothing is going forward in life.
Even David got to this point many different times. Not knowing why God was allowing him to go through all those trials, He cried out from all the pain and suffering Saul had been putting him through wondering why all his enemies were defeating him. But with every such example in the Bible, these experiences worked out for good. God used that experience to strengthen David, bringing him to trust in God alone for his strength rather than himself or other men, which is a trait required for the great role God was to work through him to make an impact on His kingdom both then and now.
What about where you work? Have you ever wondered why God doesn't open the door to a promotion or to work in another kitchen when it seems that you have nothing more to learn in your position and it seems best to move on? Ever wonder why you're struggling so much even though you haven't done anything to deserve it? That's because it's all about God's perfect timing, not ours, allowing God's perfect will to be done through some not-so-perfect people.
Sometimes the best way to understand this is to look back a couple of years in your own life. Looking at mine, I remember a few years ago I was wondering why God had me working in the same restaurant so long when things seemed to be going so terribly. It ended up that I learned a great deal there (both in the kitchen and in my spiritual growth through the struggles I went through), and if I had taken another job during that time I probably wouldn't have had the opportunity to live and cook in France and Australia. And if I hadn't lived there and done that I wouldn't have met the wonderful woman who is now my wife! It's amazing looking at how much better God's perfect timing is than my own perceived "perfect timing", as "there is a way that seems right to a man, but its end is the way of death" (Proverbs 16:25, NKJV)