Add sleep to avoid 100% busy CPU loop in PhysicsServerExample
Added btClock::usleep Fix broken TinyRenderer example code.
This commit is contained in:
@@ -332,6 +332,7 @@ btInProcessExampleBrowserInternalData* btCreateInProcessExampleBrowser(int argc,
|
||||
|
||||
while (data->m_args.m_cs->getSharedParam(0)==eExampleBrowserIsUnInitialized)
|
||||
{
|
||||
b3Clock::usleep(1000);
|
||||
}
|
||||
|
||||
return data;
|
||||
@@ -366,6 +367,7 @@ void btShutDownExampleBrowser(btInProcessExampleBrowserInternalData* data)
|
||||
} else
|
||||
{
|
||||
// printf("polling..");
|
||||
b3Clock::usleep(1000);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user