pxfsleep

Date:

10-20-2011

NAME

PXFSLEEP - Delays process execution

SYNOPSIS

INTEGER iseconds, isecleft, ierror
CALL PXFSLEEP(iseconds, isecleft, ierror)

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

IEEE Std 1003.9-1992 standard interface for FORTRAN 77

DESCRIPTION

The PXFSLEEP subroutine waits iseconds before generating a SIGALRM signal. If a previous PXFSLEEP has time remaining, isecleft contains the number of seconds until the signal SIGALRM would have been generated.

All arguments must be of default kind unless documented otherwise. Default kind is KIND=4 for integer, real, complex, and logical arguments.

The following is a list of arguments for this routine:

iseconds

Default integer input variable containing the number of real-time seconds to wait before sending the calling process a SIGALRM signal.

isecleft

Default integer output variable containing the number of seconds left until a previous request would have generated a SIGALRM signal.

ierror

Default integer output variable containing a status of zero if PXFSLEEP was successful.

NOTES

Replace the use of the sleep(3c) function with the subroutine call to PXFSLEEP().

EXAMPLES

program pxftest
integer iseconds, isecleft, ierror
iseconds = 10
isecleft = 0
ierror = 0
CALL PXFSLEEP(iseconds, isecleft, ierror)
if (ierror .ne. 0) then
   print *,'FAILED: PXFSLEEP call failed with error = ',ierror
else
   print *,'PASSED: PXFSLEEP call returned no error'
endif
if (isecleft .ne. 0) then
   print *,'FAILED: PXFSLEEP, isecleft not zero, =',isecleft
endif
end

SEE ALSO

alarm(2)

sleep(3c)