Skip to content

Commit

Permalink
Merge pull request #7 from jules1univ/main
Browse files Browse the repository at this point in the history
fix linux physics tick
  • Loading branch information
julesgrc0 authored Feb 18, 2024
2 parents 133038c + 78df842 commit f7b35d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: wipsy-${{env.BUILD_PLATFORM}}-${{matrix.arch}}
path: ./${{env.BUILD_PATH}}/wispy

path: |
./${{env.BUILD_PATH}}/wispy
./tools/resource.pack
3 changes: 2 additions & 1 deletion src/core/bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ void *update_bridge(void *arg)
QueryPerformanceCounter(&time_start);
#else
struct timespec time_start, time_end;
clock_gettime(CLOCK_MONOTONIC, &time_start);
#endif // _WIN32

update_chunkview(td->chunk_view, td->chunk_group,
Expand Down Expand Up @@ -164,7 +165,7 @@ void *update_bridge(void *arg)
#elif __linux__
clock_gettime(CLOCK_MONOTONIC, &time_end);
if ((time_end.tv_sec - time_start.tv_sec) +
(time_end.tv_nsec - time_start.tv_nsec) / 1000000000 >=
(time_end.tv_nsec - time_start.tv_nsec) / 1000000000.0 >=
PHYSICS_TICK) {
clock_gettime(CLOCK_MONOTONIC, &time_start);
#endif // _WIN32
Expand Down

0 comments on commit f7b35d4

Please sign in to comment.