timer resolution

Marc Lehmann schmorp at schmorp.de
Sun Dec 7 21:35:39 CET 2008

On Sun, Dec 07, 2008 at 09:57:00PM +0530, Anupam Kapoor <anupam.kapoor at gmail.com> wrote:
> i have been playing around with libev for some networking related
> stuff. i was wondering if it was possible to have timers with
> millisecond resolution ?

That's not really in the hands of libev.

> i can pass floating point values to ev_timer_* functions, does it give
> me millisecond resolution ?

No, most operating systems and kernels can't give you millisecond
resolution, and libev cannot sensibly improve upon those.

You will get the best resolution possible, which is almost always worse
than 500hz, and usually better than 50hz.

                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