[fpc-pascal]My application is making my system less responsive

barry at beenthere-donethat.org.uk barry at beenthere-donethat.org.uk
Thu Sep 6 15:59:04 CEST 2001


marcov at stack.nl (Marco van de Voort) wrote:

> > I am writing an application for backing up, to and restoring from,
> a
> > tape streamer which uses Afio for backup and the Forms library for
> the
> > user interface.
> > 
> > In order to display files within a tape archive I am using POpen()
> in
> > conjuction with Afio -tv.  Using a 'While' loop I read each
> filename 
> > output by afio with ReadLn() and display it in a browser.
> > 
> > Whilst the loop is active CPU usage is high, movement of the mouse
> > pointer becomes a bit jerky and, if the pointer is moved over the
> > browser listing, it flickers so much it is barely visible.
> > 
> > I do use fl_check_forms within the loop but it doesn't seem to
> help
> > much.
> > 
> > Is there something I can do to alleviate the problem?
> 
> Add a usleep (unit linux I hope, otherwise it is called nanosleep)
> to the
> loop. E.g. usleep(50000);

Thanks for your reply but I cannot find any reference to usleep,
nanosleep or any other sleep in the Free Pascal documentation.

Barry Samuels





More information about the fpc-pascal mailing list