[PATCH 4/6] xfree86: Keep trying to set interface on drm for 2 seconds.
Geert Uytterhoeven
geert at linux-m68k.org
Thu Mar 21 23:28:32 PDT 2013
On Thu, Mar 21, 2013 at 7:31 PM, Julien Cristau <jcristau at debian.org> wrote:
> On Thu, Mar 21, 2013 at 14:45:16 +0100, walter harms wrote:
>>
>> Am 19.03.2013 20:12, schrieb Bryce Harrington:
>> > + usleep(10000);
>>
>>
>> nitpicking:
>> posix 2008 says that usleep() is obsolet, perhaps you can use sleep() here ?
>>
> How would you convert 10ms to an integer number of seconds?
Not. Use nanosleep(2) instead. Beware the fine details:
Compared to sleep(3) and usleep(3), nanosleep() has the following
advantages: it provides a higher resolution for specifying the sleep
interval; POSIX.1 explicitly specifies that it does not interact with
signals; and it makes the task of resuming a sleep that has been inter-
rupted by a signal handler easier.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the xorg-devel
mailing list