NAME
get_expiration_time() — add a specific time interval to the current absolute system time
SYNOPSIS
#include <time.h>
int get_expiration_time(
struct timespec *delta,
struct timespec *abstime
);
DESCRIPTION
The
get_expiration_time()
function adds a specific time interval to the current absolute system time and
returns the new absolute time.
This new absolute time is used as the expiration
time in a call to
pthread_cond_timedwait(3T).
The
delta
argument represents the number of seconds and nanoseconds to add to the current
system time.
On return from this function, the
abstime
argument contains the absolute system time that will be used in a call to
pthread_cond_timedwait(3T).
Parameters
- delta
Number of seconds and nanoseconds to add to the current system time.
- abstime
Output parameter for the absolute system time after adding
delta
to the current absolute system time.
RETURN VALUE
Upon successful completion,
get_expiration_time()
returns zero. Otherwise, an error number is returned to indicate the error
(the
errno
variable is not set).
ERRORS
If any of the following occur, the
get_expiration_time()
function returns the corresponding error number:
- [EINVAL]
The value specified by
delta
or
abstime
is invalid.
AUTHOR
get_expiration_time()
was developed by X/Open.
SEE ALSO
pthread_cond_timedwait(3T).
STANDARDS CONFORMANCE
get_expiration_time()
: X/Open.