Sfoglia il codice sorgente

Fix missing ;

static float to static void for waitseconds()
legacy
jeunathe jnat 11 anni fa
parent
commit
f67fdf41c2
1 ha cambiato i file con 4 aggiunte e 5 eliminazioni
  1. +4
    -5
      src/sys/timer.cpp

+ 4
- 5
src/sys/timer.cpp Vedi File

@@ -65,7 +65,7 @@ private:
return 1e-6f * (tv.tv_usec - tv0.tv_usec) + (tv.tv_sec - tv0.tv_sec);
}

static float WaitSeconds(float seconds)
static void WaitSeconds(float seconds)
{
if (seconds > 0.0f)
usleep((int)(seconds * 1e6f));
@@ -84,11 +84,10 @@ private:
return secs_per_cycle * (cycles.QuadPart - cycles0.QuadPart);
}

static float WaitSeconds(float seconds)
static void WaitSeconds(float seconds)
{
if (seconds > 5e-4f)
Sleep((int)(seconds * 1e3f + 0.5f));
return .0f; /* FIXME */
}

static float GetSecondsPerCycle()
@@ -111,7 +110,7 @@ private:
return secs_per_cycle * (cycles - cycles0);
}

static float WaitSeconds(float seconds)
static void WaitSeconds(float seconds)
{
if (seconds > 0.0f)
sys_timer_usleep((int)(seconds * 1e6f));
@@ -136,7 +135,7 @@ private:
return 1e-3f * (ticks - ticks0);
}

static float WaitSeconds(float seconds)
static void WaitSeconds(float seconds)
{
if (seconds > 5e-4f)
SDL_Delay((int)(seconds * 1e3f + 0.5f));


Caricamento…
Annulla
Salva