misc./libev & libeio
libev - example: timer
toysmars
2012. 7. 9. 00:50
ev_timer_init(ev_timer*, callback, ev_tstamp after, ev_tstamp repeat)
- configure the timer to trigger after after seconds.
- If repeat is 0, then it will automatically be stopped once the timeout is reached.
- If repeat is positive, then the timer will automatically be configured to trigger again repeat seconds later, again and again.
ev_timer_again(loop, ev_timer*)
- This will act as if the timer timed out and restart it again if it is repeating.