Skip to content

FpSleep

Suspend process for several seconds

Declaration

Source position: bunxh.inc line 44

  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

Name Description
fpAlarm Schedule an alarm signal to be delivered
fpNanoSleep Suspend process for a short time
fpPause Wait for a signal to arrive

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.