标签: macos clang sleep
struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 500000L; select(0, NULL, NULL, NULL, &tv);
这在Linux上按预期睡了5秒,但在MAC(约塞米蒂)它会立即返回?
$ clang --version Apple LLVM version 7.0.0 (clang-700.1.76) Target: x86_64-apple-darwin14.5.0 Thread model: posix