Add sleep to avoid 100% busy CPU loop in PhysicsServerExample
Added btClock::usleep Fix broken TinyRenderer example code.
This commit is contained in:
@@ -28,6 +28,10 @@ public:
|
||||
/// the Clock was created.
|
||||
double getTimeInSeconds();
|
||||
|
||||
///Sleep for 'microSeconds', to yield to other threads and not waste 100% CPU cycles.
|
||||
///Note that some operating systems may sleep a longer time.
|
||||
static void usleep(int microSeconds);
|
||||
|
||||
private:
|
||||
struct b3ClockData* m_data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user