Messages in this thread | | | From | johan.adolfsson@axis ... | Subject | Re: gettimeofday() system call timing curiosity | Date | Fri, 8 Mar 2002 21:29:59 +0100 |
| |
> > > What happens if you remove the printf/puts and simply counts the number > > of times the different cases happen? > > > > Try it. It doesn't matter. Alan was correct, my computer sucks. However, > they won't give me a 10 GHz one (yet). Note that although gettimeofday() > has 1 microsecond resolution, not all the codes are exercised. We get > something with the granularity of 50 to 190 microseconds.
I admit that I don't know the details of the x86 implementation, but that sounds a little to large doesn't it?
I recently fixed the cris port to get 1 us resolution (by reading a 25MHz timer value within a jiffie). My tests show that the time between calls to gettimeofday() typically is 4-5 us on the 100MIPS ETRAX100LX - not that bad. On my Linux PC i got 1us most of the time but never the same value, but that is an old machine - PII 266 (reminds me I need to change machine:).
.. > > Cheers, > Dick Johnson
/Johan
- 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/
| |