I'd spend at least an hour up there. Take photos, grab a drink -- chill out and rest. You have to pay to go up so might as well get your money's worth. Check out all the rooftop pool's while you're there.
Unless you are really running low on souvenirs emblazoned with male genitalia (and who isn't?) and/or non-descript leather bags, there's no reason to allow a lot of time here. It's a tourist trap and a dull one at that. Rub the nose of Il Porcellino for luck and kicks and be done with it.