[fpc-pascal]High resolution timers on linux ?
kenneth at computercafeen.dk
kenneth at computercafeen.dk
Tue Aug 28 11:03:28 CEST 2001
486 ?
This piece of software is meant to be running on a
SingleBoardComputer running a Intel 386EX Microprocessor @ 25 Mhz
with a 2.2."something" kernel
I suppose it still can use the usleep function,
if it is implementet into fpc ?
Or if the nanosleep function works on old x386 type processors ?
marcov at stack.nl (Marco van de Voort) wrote ..
> > On Mon, 27 Aug 2001, Kenneth Due wrote:
> >
> > > Hello list
> > >
> > > I need some way to determine when 1/10000 sec has passed
> > >
> > > I suppose it can be done with the timerchip in the PC - but how ?
> > >
> > > anyone ......
> > >
> >
> > man usleep
> >
> > usleep(X) suspends the execution of calling process for X microseconds
> > (10^-6 sec). The accuracy may not be (== is not) 100% due to the
> > multitasking nature of UNIX-type operating systems.
> >
> > There are also setitimer() and getitimer()-functions that can be used
> > to get a callback-type timed action.
>
> nanosleep in the Unix/Linux unit works for both Linux and FreeBSD.
>
> To properly work, it needs a machine with the rdtsc instruction (IIRC later
> Intel 486's and all but the old pentiums)
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list