Skip to content

Commit 67b0c89

Browse files
authored
Merge pull request #958 from erwincoumans/master
remove some sleep delays from PhysicsServerExample physics loop.
2 parents 5d4e71b + 6db217b commit 67b0c89

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

examples/SharedMemory/PhysicsServerExample.cpp

-21
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ void MotionThreadFunc(void* userPtr,void* lsMemory)
299299

300300

301301
double deltaTimeInSeconds = 0;
302-
double sleepCounter = 0;
303302
do
304303
{
305304
BT_PROFILE("loop");
@@ -310,27 +309,7 @@ void MotionThreadFunc(void* userPtr,void* lsMemory)
310309
}
311310
double dt = double(clock.getTimeMicroseconds())/1000000.;
312311
clock.reset();
313-
314-
sleepCounter+=dt;
315-
316-
if (sleepCounter > sleepTimeThreshold)
317-
{
318-
BT_PROFILE("usleep(100)");
319-
sleepCounter = 0;
320-
b3Clock::usleep(100);
321-
322-
}
323-
324-
{
325-
if (gEnableRealTimeSimVR)
326-
{
327-
BT_PROFILE("usleep(1000)");
328-
b3Clock::usleep(1000);
329-
}
330-
}
331312
deltaTimeInSeconds+= dt;
332-
333-
334313

335314
{
336315

0 commit comments

Comments
 (0)