瀏覽代碼

Fix missing ;

static float to static void for waitseconds()
legacy
jeunathe jnat 11 年之前
父節點
當前提交
f67fdf41c2
共有 1 個檔案被更改,包括 4 行新增5 行删除
  1. +4
    -5
      src/sys/timer.cpp

+ 4
- 5
src/sys/timer.cpp 查看文件

@@ -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));


Loading…
取消
儲存