cmarti, my two cents is that you simply make a call as to what is more important to you:

1) Finishing the task as soon as possible

2) Allow one to multi-task on this machine while the task is running.

If the first is more important to you, stick with optimized code, a tight loop and maybe play with priority a little bit - no sleep() timer.

If the second is more important, use a sleep timer of (0.001) and bite it on the extra time penalty.

If Kixtart had an builtin DoEvents() function, I would use that instead of sleep. The extra overhead associated with calling a COM DoEvents is way too expensive (imho).

[ 18. September 2003, 17:28: Message edited by: Shawn ]