What is the easiest way to run some code each millisecond for a certain amount of time?

Actually, I want it to run as many times as possible in 2 minutes.