lkml.org 
[lkml]   [2010]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 0/4] timer: Added usleep[_range] timer
On Wed 2010-07-28 12:33:03, Patrick Pannuto wrote:
> After writing both documentation and a checkpatch rule explaining
> why the usleep API should never be used, it occurred to me that
> perhaps such an API should never be added :) - at least not in its
> previous form.
>
> This iteration is similar, with the notable difference that now
> usleep has a "built-in slack" of 200%. This is analogous to msleep,
> which has a built-in slack of 0.4% (since it relies on legacy timers,
> which have a built-in slack of 0.4%). 200% slack is significantly
> greater than 0.4%, but the scale of usleep is also significantly
> different than that of msleep, and I believe 200% to be a sane
> default.

So, I do msleep(1 second) and it will delay for 3 seconds? Thats
excessive, and will be annoying/plain to see with just eyes. Better
select reasonable default (1%?) and let people who care switch to
msleep_range...
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2010-08-04 09:11    [W:0.129 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site