For us "old" ex-Visual Basic developers, Sleep(x) is generally used wherever a DoEvents might have been needed. Eg: If you have a loop that loads a long list of values into a listview, you would put Sleep(0) at the end of each iteration so that the list updates as it's being loaded - otherwise the user is sitting there looking at a screen that's doing nothing until the loading loop has completed.