mme_get_api_timeout_remaining()

Get the time left on the unblocking timer

Synopsis:

#include <mme/mme.h>

int mme_get_api_timeout_remaining( mme_hdl_t *hdl,
                                   uint32_t *milliseconds );

Arguments:

hdl
An MME connection handle.
milliseconds
Deprecated.

Library:

mme

Description:

The function mme_get_api_timeout_remaining() distinguishes between EINTR errors caused by the MME unblocking the caller and other EINTR errors.

If a client application has used mme_set_api_timeout() to set an unblocking timer on the control context, API calls that are blocked beyond the set timeout period will unblock the client, returning early with the errno set to EINTR.

Because errnos propagate up, an EINTR can be returned to the client for reasons other than a timeout. To distinguish EINTR errors caused by the MME unblocking the caller and other EINTR errors, call mme_get_api_timeout_remaining() to get the time remaining on the timer. If the time remaining indicated by milliseconds is greater that 0 (zero), then the EINTR error wasn't caused by a timeout. If the time remaining is 0, then the EINTR was caused by a timeout.


Note: The MME's default configuration is to disable unblocking capabilities, which renders the information delivered by mme_get_api_timeout_remaining() meaningless. To enable the MME's unblocking capability, set the <Unblock> configuration element attribute to “true”.

Events

None delivered.

Blocking and validation

This function doesn't block.

Returns:

0
Success. Assuming an MME EINTR
-1
An error occurred (errno is set). Errno is set. An EINVAL error indicates that the timeout is set to 0, so the request for the time remaining is invalid.

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_set_api_timeout()