New sample renderer and UI (#10)

No changes to simulation
This commit is contained in:
Erin Catto 2026-06-06 10:06:05 -07:00 • committed by GitHub
commit 9e02b7f3b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
196 changed files with 116992 additions and 29969 deletions

View file

@ -78,6 +78,11 @@ void b3Yield( void )
SwitchToThread();
}
void b3Sleep( int milliseconds )
{
Sleep( (DWORD)milliseconds );
}
typedef struct b3Mutex
{
CRITICAL_SECTION cs;
@ -250,6 +255,14 @@ void b3Yield( void )
sched_yield();
}
void b3Sleep( int milliseconds )
{
struct timespec ts;
ts.tv_sec = milliseconds / 1000;
ts.tv_nsec = ( milliseconds % 1000 ) * 1000000L;
nanosleep( &ts, NULL );
}
#include <pthread.h>
typedef struct b3Mutex
{
@ -373,6 +386,7 @@ void b3JoinThread( b3Thread* t )
#include <mach/mach_time.h>
#include <sched.h>
#include <sys/time.h>
#include <time.h>
static double s_invFrequency = 0.0;
@ -418,6 +432,14 @@ void b3Yield( void )
sched_yield();
}
void b3Sleep( int milliseconds )
{
struct timespec ts;
ts.tv_sec = milliseconds / 1000;
ts.tv_nsec = ( milliseconds % 1000 ) * 1000000L;
nanosleep( &ts, NULL );
}
#include <pthread.h>
typedef struct b3Mutex
{
@ -560,6 +582,11 @@ void b3Yield( void )
{
}
void b3Sleep( int milliseconds )
{
( (void)( milliseconds ) );
}
typedef struct b3Mutex
{
int dummy;