reduce code in fps__timing_thread

main
Dominik Madarász 2024-02-11 13:11:22 +01:00
parent 78d44cff61
commit f23b2b6e08
3 changed files with 0 additions and 15 deletions

View File

@ -379093,12 +379093,7 @@ int fps__timing_thread(void *arg) {
timer_counter++;
int64_t tt = (int64_t)(1e9/(float)framerate) - ns_excess;
uint64_t took = -time_ns();
#if is(win32)
do_once timeBeginPeriod(1);
sleep_ns( (float)tt );
#else
sleep_ns( (float)tt );
#endif
took += time_ns();
ns_excess = took - tt;
if( ns_excess < 0 ) ns_excess = 0;

View File

@ -14,12 +14,7 @@ int fps__timing_thread(void *arg) {
timer_counter++;
int64_t tt = (int64_t)(1e9/(float)framerate) - ns_excess;
uint64_t took = -time_ns();
#if is(win32)
do_once timeBeginPeriod(1);
sleep_ns( (float)tt );
#else
sleep_ns( (float)tt );
#endif
took += time_ns();
ns_excess = took - tt;
if( ns_excess < 0 ) ns_excess = 0;

View File

@ -26237,12 +26237,7 @@ int fps__timing_thread(void *arg) {
timer_counter++;
int64_t tt = (int64_t)(1e9/(float)framerate) - ns_excess;
uint64_t took = -time_ns();
#if is(win32)
do_once timeBeginPeriod(1);
sleep_ns( (float)tt );
#else
sleep_ns( (float)tt );
#endif
took += time_ns();
ns_excess = took - tt;
if( ns_excess < 0 ) ns_excess = 0;