Sign in Join
FPDoc Onlineexperiment

FpSleep function

In unit BaseUnix

Suspend process for several seconds.

Declaration

pascal
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

Example: ex73

pascal
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.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.