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

I think he wants that in 2 minutes.