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.
我正在尝试构建一个以毫秒为单位的 python 超时异常。
python signal.alarm 函数的分辨率为 1 秒。
如何获得一个等效的函数来请求一个给定进程的 SIGALRM 信号,比如毫秒,而不是秒?
到目前为止,我还没有找到简单的解决方案。
提前感谢您的意见。
请改用signal.setitimer()。