[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] [PATCH] Use clock_nanosleep for better precisi

From: Simon Morlat
Subject: Re: [Linphone-developers] [PATCH] Use clock_nanosleep for better precision and CPU utilization
Date: Thu, 17 Feb 2011 13:06:56 +0100

This is also interesting but... it breaks encapsulation of the time
related functions in the msticker, and breaks compilation on other than
linux platforms.
Indeed actually the only call for knowing time is calling
s->get_cur_time_ptr(). Your patch calls clock_gettime() and thus breaks
the use of the s->get_cur_time_ptr().

I think the best approach would be to have the ticker use an interface
with two functions like:

struct MSTickerTimeManager{
        uint64_t (*get_cur_time)(void *data);
        int (*sleepUntil)(uint64_t deadline);

Then this would allow your clock_gettime()+clock_nanosleep()
implementation to fit into this interface.


Le lundi 14 février 2011 à 10:17 +0100, Matteo Fortini a écrit :
> _______________________________________________
> Linphone-developers mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]