"select() provides better timeout resolution: down to the microsecond. Both ppoll() and
pselect() theoretically provide nanosecond resolution, but in practice, none of these calls
reliably provides even microsecond resolution."
Microsecond resolution on the interface is worthless when the granularity of the timer
utilized is in the millisecond range.
Posted Dec 6, 2007 20:11 UTC (Thu) by njs (guest, #40338)
[Link]
1) Microsecond resolution is far from worthless even when the timer's granularity is in the
millisecond range... given that the alternative API, poll(2), has *second* resolution. (What
were POSIX guys thinking?)
2) You're just repeating his point anyway...? Maybe I missed something.
3) Timers have better than millisecond resolution these days anyway, if you're running a
tickless kernel. At least that's my understanding.
Huh?
Posted Dec 10, 2007 16:35 UTC (Mon) by pphaneuf (guest, #23480)
[Link]
According to the poll(2) I have here, the timeout is actually in milliseconds.
Huh?
Posted Dec 11, 2007 5:11 UTC (Tue) by njs (guest, #40338)
[Link]
...Quite right. Not sure how I misread that man page myself.
Well, points (2) and (3) still stand, I guess :-).
We call that "thinking ahead"
Posted Dec 8, 2007 0:40 UTC (Sat) by vmole (guest, #111)
[Link]
Of course, the interface wasn't *designed* for Linux. Someone had the foresight to see that someday there could be systems that provide microsecond resolution, and decided that allowing for that might possibly be a good idea.