If you know the Processor Speed (MHz) then there is an assembler command which reads the cpu cycles (for example a 1MHz Processor has 1.000.000 cycles/second) so you can do it in this way.
http://en.wikipedia.org/wiki/RDTSC Rainer Am Mittwoch, 7. November 2007 23:27 schrieb John Coppens: > Hi all. > > I need a small delay in my program, which bitbangs an i2c interface > connected to the parallel port. This is mainly for educational purposes, > so please don't question the wiseness of this decision. > > Is there any simple way (short of writing a kernel module) of delaying > less than the HZ value? Weirdly, fpNanosleep seems to delay 8.3 ms > minimally (weird, 'cause that's less than the HZ value). > > I'm using a 2.6 kernel. > > John > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal