开发者

signal.alarm function with resolution greater than 1 second?

开发者 https://www.devze.com 2023-01-17 08:08 出处:网络
I\'m trying to build a python timeout exception that runs in milliseconds. The python signal.alarm function has a 1 second resolution.

I'm trying to build a python timeout exception that runs in milliseconds.

The python signal.alarm function has a 1 second resolution.

How would one get an equivalent function that requests a SIGALRM signal to a given process in, say milliseconds, as opposed to seconds?

I've found no simple solutions as of yet.

Thanks in advance 开发者_JAVA百科for your input.


Use signal.setitimer() instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号