摘要:
在不怎么了解libevent的情况下,看到timer这个关键字想到可以用来做定时任务,官方资料也不齐全,就从代码里看到了TIMEOUT字样,这么说来应该是支持timeout了,那interval呢,貌似没有发现更好的办法,姑且在timeout里再timeout一次吧,留代码备用。 1 #include 2 #include 3 #include 4 5 typedef struct { 6 struct timeval tv; 7 struct event * ev; 8 } timer_param_t; 9 10 11 void timer_task(... 阅读全文
posted @ 2013-08-29 18:25
jieyuefeng
阅读(1410)
评论(0)
推荐(0)

浙公网安备 33010602011771号