The Sleep function is never really accurate. Windows is not a realtime operating system. However, you might get beter accuracy with multimedia timers. Do a search for them on codeguru or google.