浏览代码

Replace deprectared usleep() calls

pull/1244/head
raysan5 5 年前
父节点
当前提交
526c85773f
共有 1 个文件被更改,包括 2 次插入8 次删除
  1. +2
    -8
      src/core.c

+ 2
- 8
src/core.c 查看文件

@ -5055,10 +5055,7 @@ static void *EventThread(void *arg)
#endif #endif
} }
} }
else
{
usleep(5000); // Sleep for 5ms to avoid hogging CPU time
}
else Wait(5); // Sleep for 5ms to avoid hogging CPU time
} }
close(worker->fd); close(worker->fd);
@ -5146,10 +5143,7 @@ static void *GamepadThread(void *arg)
} }
} }
} }
else
{
usleep(1000); //Sleep for 1ms to avoid hogging CPU time
}
else Wait(1); // Sleep for 1 ms to avoid hogging CPU time
} }
} }

正在加载...
取消
保存