}\r
IMMObject::CollectGarbage();\r
DWORD end_point = GetTickCount();\r
- Sleep(50 - (end_point-starting_point));\r
+ /* Sleep if we didn't use up too much time already */\r
+ if (starting_point + 50 > end_point)\r
+ Sleep(50 - (end_point-starting_point));\r
}\r
#ifdef _DEBUG\r
CProfileSample::Output();\r