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

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

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.

Documentation generated on: May 14 2021