mirror of
https://github.com/OpenMW/bullet3.git
synced 2026-11-22 21:49:26 -10:00
Add sleep to avoid 100% busy CPU loop in PhysicsServerExample
Added btClock::usleep Fix broken TinyRenderer example code.
This commit is contained in:
1 parent
238ba8c642
commit
3bdcf23a05
9 files changed
+61
-13
No files matched your search
@@ -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