Add sleep to avoid 100% busy CPU loop in PhysicsServerExample

Added btClock::usleep
Fix broken TinyRenderer example code.
This commit is contained in:
erwin coumans
2016-08-13 12:21:18 -07:00
parent 238ba8c642
commit 3bdcf23a05
9 changed files with 61 additions and 13 deletions

View File

@@ -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);
}
};