> > It's not uncommon just to busy wait for that amount of time:
> > usleep(100);
>
> But that would "hang" the machine during this time, right?
Yep.
> It will be thousands of readings in a second, so I can't "hang" the
> machine.
Oh. Out of curiosity, how do you expect to do thousands of reads per
second when you have a thousandth of a second between them? :)
Seriously, you probably want to look at the PC speaker driver patch -
this did some pretty hairy modifications to the timer interrupt stuff
to have it use the RTC instead of the usual PC timer chip, I think.
It seems to have disappeared from its previous home, but
dave@infradead.org was last to be seen with it.
> >> Can I count the time with a higher precision than with jiffies?
> >> I need to keep track of the time on every read, but a jiffie is too
> >> slow.
> >
> > You can use the TSC, but that screws up portability.
>
> portability between platafforms or between kernels?
Platforms. The TSC is an i386 thing, though other architectures often
have similar features. Either way, it's only really useful for
busy-waiting and accurate timing measurements anyway.
> Where can I find more info about it?
grep the source for CONFIG_M586TSC, or visit www.intel.com.
Matthew.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/