How long can a baby be in a swing?

My parents where awesome enough to get me the mama roo swing, but since it has to be plugged in it’s not super portable. I normally keep the swing close by to whatever I’m doing (Like cooking in the kitchen.) I’m a little paranoid because I have friend last who’s baby died of SIDS in a swing. How often should I check on the baby in a swing? Can I leave the room for a period of time?