I try to call a function every 1 ms. The problem is, I like to do this with windows. So I tried the multimediatimer API.
Source
You can try to run timeBeginPeriod(1) at the program start and timeEndPeriod(1) before quitting. This probably can enhance timer precision.
timeEndPeriod(1)