A long time… Seven years, as appears from chap. 14.10.
11:19. There was not a city that delivered itself to the children of Israel, except the Hevite, who dwelt in Gabaon: for he took all by fight.
11:20. For it was the sentence of the Lord, that their hearts should be hardened, and they should fight against Israel, and fall, and should not deserve any clemency, and should be destroyed as the Lord had commanded Moses.
Hardened… This hardening of their hearts, was their having no thought of yielding or submitting: which was a sentence or judgment of God upon them in punishment of their enormous crimes.
11:21. At that time Josue came and cut off the Enancims from the mountains, from Hebron, and Dabir, and Anab, and from all the mountain of Juda and Israel, and destroyed their cities.
11:22. He left not any of the stock of the Enacims, in the land of the children of Israel: except the cities of Gaza, and Geth, and Azotus, in which alone they were left.
11:23. So Josue took all the land, as the Lord spoke to Moses, and delivered it in possession to the children of Israel, according to their divisions and tribes. And the land rested from wars.
Josue Chapter 12
A list of the kings slain by Moses and Josue,
12:1. These are the kings, whom the children of Israel slew and possessed their land beyond the Jordan towards the rising of the sun, from the torrent Arnon unto mount Hermon, and all the east country that looketh towards the wilderness.