How do I cancel a timer?

Marc Lehmann schmorp at schmorp.de
Mon Dec 22 06:42:43 CET 2008


On Sat, Dec 20, 2008 at 06:11:34PM +1300, Space Ship Traveller <space.ship.traveller at gmail.com> wrote:
>
> Hey, you could always use C++  and have a constructor :)
>
> Just thought I'd throw that out there. Lol..

Just in case you meant that seriously, the c++ interface of libev indeed does
that, but that doesn't change the fact that you need to initialise the
watcher structure with an initialisation function, in this case it's a
constructor.

In fact, you can call the ev_xx_init macro a constructor, and, yes, c++
doesn't really like it what you call the constructor twice on the same
memory area either.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at goof.com
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list