[fpc-pascal]Delay replacement...

Johann Glaser Johann.Glaser at gmx.at
Mon Nov 27 20:15:14 CET 2000


Hi!

> How can I force a scheduling to sleep for a while?

Delay is defined as

Procedure Delay(DTime: Word);
{
  Wait for DTime milliseconds.
}
Begin
  Select(0,nil,nil,nil,DTime);
End;

You can use this very small procedure and define your own
"Delay"-Procedure. "Select" will suspend the process until DTime
Milliseconds are over, so all other processes get execution time.

Bye
  Hansi

-- 
Johann Glaser           <Johann.Glaser at gmx.at>
       Vienna University of Technology
            Electrical Engineering 
http://stud3.tuwien.ac.at/~e9825761/index.html




More information about the fpc-pascal mailing list