My daughter hated her swing and preferred to be held by someone. If your child seems disoriented by the swinging -- for instance, if the child's eyes don't track regularly during or shortly after swingtime -- don't use the swing.
I know a lot of parents rely on the swing to give them a little span of peace, but in our case, it really was not the best solution. I am one of seemingly few parents who says "No swing" but ;) I'll say it here, just in case you need permission to stop using one.
Otherwise, from my experience, I would recommend no more than 10-15 minutes, for a 2 or 3 month old. Swings are sometimes more stimulating than restful for some infants, and these children can be just as happy, stimulated, or rested in a crib or playpen or on a blanket on the floor.
Best of luck!