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

Of course. Apologize for the mistyping.