Mail Archives: djgpp/1999/08/15/23:36:14
/* Simon, you could also do this:
If you are not using Allegro, you can delay for 10 milliseconds by */
delay(10);
/* If you are using Allegro's timer handler, you should use */
rest(10);
/* To maintain compatibility with Windows's DOS box implementation,
Allegro's timer handler rounds all times to the nearest 5 ms.
Groman <groman AT tfz DOT net> wrote in message news:37B64F8D DOT EED7B6CF AT tfz DOT net...
> to achieve best results, program the timers yourself in assembly
Or let Shawn write your assembly for you. Get Allegro; it'll simplify timer
handling quite a bit.
http://www.talula.demon.co.uk/allegro/
>
> Simon Redwood wrote:
>
> > I am new to using djgpp under dos, being a unix programmer. I am having
> > trouble with delays.
> >
> > Can I rely on usleep to give me accurate timings.
> >
> > Giving usleep a value of 10000-12500 produces the same delay, whereas
13000
> > gives the same as 20000, where I am going wrong.
> >
> > I would like to put a delay into a loop of about 1/100 sec. how is the
best
> > way to acheive this
> >
> > I am also looking to work with microprocessors where I will need
accurate
> > timings of nanoseconds, how can this be best acheived.
> >
> > TIA
> >
> > Simon
*/
- Raw text -