Potential fix for Linux slow performance (usleep(0) takes a lot of time)

Remove b3RobotSimAPI, use RobotSimulator/b3RobotSimulatorClientAPI.h instead
This commit is contained in:
Erwin Coumans
2017-05-13 13:37:49 -07:00
parent 0944790577
commit ef7a7f9004
10 changed files with 204 additions and 1434 deletions

View File

@@ -198,11 +198,13 @@ void b3Clock::usleep(int microSeconds)
Sleep(millis);
}
#else
::usleep(microSeconds);
//struct timeval tv;
//tv.tv_sec = microSeconds/1000000L;
//tv.tv_usec = microSeconds%1000000L;
//return select(0, 0, 0, 0, &tv);
if (microSeconds>0)
{
::usleep(microSeconds);
//struct timeval tv;
//tv.tv_sec = microSeconds/1000000L;
//tv.tv_usec = microSeconds%1000000L;
//return select(0, 0, 0, 0, &tv);
}
#endif
}