Messages in this thread | | | Date | Mon, 21 Mar 2005 10:35:01 -0600 | From | Chris Friesen <> | Subject | Re: Short sleep precision |
| |
Jan Engelhardt wrote:
>>You can spin on the gettimeofday() result in userspace. > > > How can I use it?
Something like:
gettimeofday(&curtime,0); add_usecs(&curtime, time_to_sleep); do { gettimeofday(&curtime,0); } while (time_before(&curtime, &expiry);
Of course, if someone changes the system time on you you're screwed....
Chris - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |