number of watcher

Marc Lehmann schmorp at
Sun Mar 2 21:12:17 CET 2014

On Sun, Mar 02, 2014 at 06:39:12PM +0330, Jafar habibi livar <iceberg.90427 at> wrote:
> I should thanks for your quick reply.
> how can I find number of watchers which already registered in loop?

Each time a watcher is started (can be tricky due to ev_again), increase
a counter. Each time one is stopped (can be a bit tricky due to timers
auto-stopping, can be checked for by using ev_is_active in the callback),
decrease a counter.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list