Open System Services System Calls Reference Manual (G06.28+)
System Functions (s and S) spt_sleep(2)
NAME
spt_sleep - Suspends execution of the thread for a specified time interval
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
unsigned int spt_sleep (
unsigned int seconds );
PARAMETERS
seconds Specifies the number of seconds for which the thread is to be
suspended.
DESCRIPTION
The spt_sleep() function suspends a thread for a specified number of seconds. A certain amount
of delay can be expected in the processing of the spt_sleep() call because of other processor-
intensive or input/output-intensive threads. If an unblocked signal is received during the suspen-
sion period, spt_sleep() returns control immediately and returns the sleep time remaining.
RETURN VALUES
This function can return the following values:
0 (zero) The thread was suspended for the full time specified.
seconds Indicates the number of seconds remaining in the specified
suspension time.
RELATED INFORMATION
Functions: spt_usleep(2).
STANDARDS CONFORMANCE
This function is an extension to the UNIX98 specification. Interfaces documented on this refer-
ence page conform to the following industry standards:
• IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
527186-005 Hewlett-Packard Company 7−309