On 10/03/2011 01:02 PM, Regid Ichira wrote:
> -             usleep(250000);
> +             struct timespec delay = {0, 250e6}; nanosleep(&delay, NULL);
>
Would it be better to define a local version of usleep in terms of
nanosleep?  I suspect the library version already does that, but if the
library version is going away, a local version is much more concise and
readable than calling nanosleep directly.  If there are concerns about
linking, the local version could be, e.g, u_sleep, since all the calls
are getting touched anyway.


_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to