Skip to content

Commit

Permalink
CI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed Aug 26, 2024
1 parent bc1a2c5 commit e22bc4e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

#if defined( _WIN32 )

#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif

#include <windows.h>
#include <windows.h>

static double s_invFrequency = 0.0;

Expand Down Expand Up @@ -74,22 +74,11 @@ void b2Yield()
SwitchToThread();
}

uint32_t b2Hash(uint32_t hash, const uint8_t* data, int count)
{
uint32_t result = hash;
for ( size_t i = 0; i < count; i++ )
{
result = ( result << 5 ) + result + data[i];
}

return result;
}

#elif defined( __linux__ ) || defined( __APPLE__ )

#include <sched.h>
#include <sys/time.h>
#include <time.h>
#include <sched.h>
#include <sys/time.h>
#include <time.h>

b2Timer b2CreateTimer( void )
{
Expand Down Expand Up @@ -196,3 +185,14 @@ void b2Yield()
}

#endif

uint32_t b2Hash( uint32_t hash, const uint8_t* data, int count )
{
uint32_t result = hash;
for ( size_t i = 0; i < count; i++ )
{
result = ( result << 5 ) + result + data[i];
}

return result;
}
1 change: 1 addition & 0 deletions test/test_determinism.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "TaskScheduler_c.h"
#include "test_macros.h"

#include "box2d/base.h"
#include "box2d/box2d.h"
#include "box2d/math_functions.h"
#include "box2d/types.h"
Expand Down

0 comments on commit e22bc4e

Please sign in to comment.