Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的代码中有两个 pthread 正在运行。它们同时运行usleep(),我想同时运行它们 5 秒。
usleep()
如何检查我的线程是否运行了 5 秒,以便在 5 秒后终止线程?