hitherto] After their return from captivity.
waited] Held the office of a porter.
the kings gate] Whereby the king was wont to go in and out of the temple. See the notes on 1 Kings 10:5.
in the companies] Whereas all the Levites had their offices in and about the temple, these were porters therein.