浏览代码

util/time: add util_time_sleep() for windows userspace

Somebody with a clue could probably do a better implemenation...
tags/mesa_7_5_rc1
Keith Whitwell 16 年前
父节点
当前提交
5250eec652
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9
    0
      src/gallium/auxiliary/util/u_time.c

+ 9
- 0
src/gallium/auxiliary/util/u_time.c 查看文件

@@ -217,4 +217,13 @@ void util_time_sleep(unsigned usecs)
} while(start <= curr && curr < end ||
end < start && (curr < end || start <= curr));
}
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
#include <unistd.h>
#include <fcntl.h>

void util_time_sleep(unsigned usecs)
{
Sleep((usecs + 999)/ 1000);
}
#endif

正在加载...
取消
保存