It took 18 years for Ayoub's prayers to be answered. When the people of Noah rejected his call, the flood came after 950 years of Dawah! No matter how dark or bleak things may seem, always be hopeful in what Allah has for you. Giving up on Allah would make you astray. Allah says: "And who despairs of the mercy of his Lord except for those astray?"
Being confident in your Lord is the dividing line between us and them. Allah says: "Indeed, no one despairs of relief from Allah except the disbelieving people."