David is running from King Saul, hiding in a cave – no guarantee of food or water, or even safety. He is desperate, and in his desperation, he asks God to wipe out the wicked from the earth.
He is asking God to judge NOW, to avenge NOW, but God alone knows the time of judgment and vengeance. The wicked, described in vs. 3 & 4, will “get theirs”, but it will be in God’s time, not David’s. God’s time, not ours.