On Mon, Mar 31, 2008 at 10:01 AM, Markus Vechiorno <finalpfc at hotmail.com> wrote: > Hi, > > I want to make a check of some parameters every x seconds (periodically). > Is there a way to call to a function periodically? > I can use the functions implemented in "dq" in pjsua because what I need is > to check the packet loss rate. > > I saw smth about pjmedia clock, but I need to know how to control it. > > For example, if I want to call pjsua_call_dump ecery 2 seconds what could > be the way? You can use pjsip_endpt_schedule_timer() to schedule a timer. The pjmedia clock probably is too heavy for this since it creates a worker thread with real-time priority to wait for the timer (although you can disable the priority boost). But you can use that, just set samples_per_frame to N*clock_rate if you want the callback to be called once every N seconds. Cheers Benny