Does a Sleep(sometime)
serve a purpose in the typical infinite window message loop, or is it just useless or even harmful?
Some examples contain the Sleep
, most of them do not.
// Main message loop:
MSG msg;
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
Sleep(500); // As pointed out below, completely nonsense
Sleep(5); // Would have been the better example, but still bad
}