gesture_timer_query()

Updated: April 19, 2023

Query a timer

Synopsis:

#include <gestures/timer.h>
int gesture_timer_query(struct gesture_base *gesture,
                        int timer_id,
                        int *pending,
                        uint64_t *expiry)

Arguments:

gesture
A pointer to the gesture.
timer_id
The id of the timer to query.
pending
Returns the current state of the timer.
expiry
Returns the expiry time of the timer.

Library:

libgestures

Description:

This function returns information about the timer. If the timer is valid, the return value is set to 0, the parameter pending is set to the timer's current pending state (destroyed timer will result in a -1 return value), and expiry is set to the timer's expiry time.

Returns:

0 if the timer is valid, -1 otherwise.