> From: ext Joakim Tjernlund [mailto:joakim.tjernlund at lumentis.se] > Sent: Friday, April 11, 2003 7:39 AM > > hmm, why not just: > expire = timespec_to_jiffies(&t); > if tv_sec and tv_sec are zero, do you need to sleep at all?
Trying to sleep for 0 time periods is difficult in many timer systems, and this is probably true for Linux also. Ie, time "t" has already passed by the time this routine is executed, but time "t+1" has not. The decision is whether to make the delay 1 in this case, or to just schedule the next ready thread. ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/