On Thu, 14 Jul 2005, Russell King wrote: > > Umm. Except, according to your description of what it's supposed to > do, the above code can have an accumulating error.
No. It can have a local drift, but the point is, the error never gets worse - it _stays_ local. There's no point in polling twice in immediate succession just because a sleep overslept. That's like a security guard testing each door twice for being locked, just because he overslept one round. Pointless. But what matters is that you don't let your local errors accumulate into the big picture. Now, if somebody wants to make nicer helper functions so that you can say timeout = ms_from_now(500); or something instead of saying "timeout = jiffies + HZ/2", then hey, go wild. At that point it's just syntactic sugar, and maybe it's worth it. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/