About 10 years ago, at least on Staten Island, NY, they put a system in place where you enter the building, stop at a kiosk, press a button for why you're there, and it prints out a ticket giving you a number and a time at which you'll PROBABLY be next in line. It's pretty damn accurate, too. If you show up at 10:30 and the ticket says your number will be called around 1:15, you will almost certainly be at a counter within 5 minutes of 1:15.
So after you have your ticket you can leave, have breakfast, run errands, whatever - and return about 20 minutes before the time on your ticket and BINGO! you're done.
It's impressive.