It seems this thread and all of the comments are a windows-hate circle jerk.
Windows is not a real-time OS. There is no reasonable expectation for it to perform as one in places where one is required.
In this case, what is required is only a "soft-real-time" OS, which even Linux can manage. But for this sort of project it is more usual to use a microcontroller.
Programming microcontrollers is, incidentally, much more fun than programming a big'n'sloppy desk OS like windows ... or linux.