Well, generally speaking, it will just take a few days for the eye pimple to go away. And you should know that eye pimple is actually caused by bacteria, an infection, and you may need antibiotics to treat it. And sometimes it will go away on its own. To treat it, the effective way you can do is just making sure your eyes are far from the bacteria, so that they can not be infected. Also, you can apply a hot, moist compress several times a day for at lease 10 minutes at a time. Just repeat it in some days. Also, you should not be stressed. Having a good rest is also effective. Anyway, just be careful about it.
Pimple is a kind of acne, which could appear in any place of your skin. It is usually caused by excess oil trapped in the pores. According to my own experience, clean the skin with pimple carefully twice each day. Don't eat too much sugar or oil food which could make this situation even worse. Take more vegetables and fruits. It is hard to say how long does it take to treat eye pimple. For me, pay attention to your diet and living habit, and it will helps. Don't squeeze the acne with hands, which will make it worse and infectious.
Hope the information helps.
Once you get the eye pimple, you should go to the hospital to accept the medical care. If you do the treatment in the continuous way, you could get recovery for about half a month. However, during this time, you should not drink or smoke. You'd better have the good diet to make the eyes moisture.