help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions] Reference for unit 'BaseUnix' (#rtl)

FpSleep

Suspend process for several seconds

Declaration

Source position: bunxh.inc line 41

function FpSleep(

  seconds: cuint

):cuint;

Description

FpSleep suspends the process till a time period as specified in seconds has passed, then the function returns. If the call was interrupted (e.g. by some signal) then the function may return earlier, and the return value is the remaining time till the end of the intended period.

If the function returns without error, the return value is zero.

See also

fpPause

  

Wait for a signal to arrive

fpAlarm

  

Schedule an alarm signal to be delivered

fpNanoSleep

  

Suspend process for a short time

Example

program example73;

{ Program to demonstrate the FpSleep function. }

uses BaseUnix;

Var
  Res : Longint;

begin
  Write('Sleep returned : ');
  Flush(Output);
  Res:=(fpSleep(10));
  Writeln(res);
  If (res<>0) then
    Writeln('Remaining seconds     : ',res);
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505