Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ timer_create(3P4) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

timer_delete(3P4)

timer_settime(3P4)

timer_gettime(3P4)

timer_create(3P4)

NAME

timer_create − allocate a per-process timer ID

SYNOPSIS

#include <sys/types.h>
#include <time.h>
#include <signal.h>

int timer_create(clock_id, evp)
int              clock_id
struct sigevent  ∗evp

DESCRIPTION

The timer_create function allocates a POSIX.4 per-process timer using the specified clock clock_id as the timing base.  The only valid POSIX.4 clock ID is CLOCK_REALTIME. timer_create returns a timer ID of type timer_id used to identify the timer in POSIX.4 timer requests.  This timer ID is unique within the calling process until the timer is deleted by the timer_delete(3P4) function.  A process may have up to 256 per-process timers allocated at one time. 

RETURN VALUE

Upon successful completion, the timer_create function returns a timer ID which can be passed to the POSIX.4 per-process timer calls.  If any of the following conditions occur, the timer_create function shall return -1 and set errno to the corresponding value:

[EMTIMERS] The calling process has already allocated all of the timers it is allowed by this implementation. 

[EINVAL] The clock_id argument does not specify a known clock. 

[EAGAIN] The system lacks sufficient queuing resources to honor the request. 

FILES

/usr/lib/libposix4.a

SEE ALSO

timer_delete(3P4), timer_settime(3P4), timer_gettime(3P4). 

WARNING

The interface to timer_create is based on IEEE Draft Standard P1003.4/D12.  This is an unapproved draft, subject to change.  Use of information contained in this unapproved draft is at your own risk.  This interface will change to reflect any changes made by future drafts of POSIX 1003.4. 

CX/UX Programmer’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026