MySQL 9.0.0
Source Code Documentation
|
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <sys/time.h>
#include "my_timer.h"
Functions | |
static void | timer_notify_thread_func (sigval arg) |
Timer expiration notification thread. More... | |
int | my_timer_initialize () |
Initialize internal components. More... | |
void | my_timer_deinitialize () |
Release any resources that were allocated as part of initialization. More... | |
int | my_timer_create (my_timer_t *timer) |
Create a timer object. More... | |
int | my_timer_set (my_timer_t *timer, unsigned long time) |
Set the time until the next expiration of the timer. More... | |
int | my_timer_cancel (my_timer_t *timer, int *state) |
Cancel the timer. More... | |
void | my_timer_delete (my_timer_t *timer) |
Delete a timer object. More... | |
int my_timer_cancel | ( | my_timer_t * | timer, |
int * | state | ||
) |
Cancel the timer.
timer | Timer object. |
state | The state of the timer at the time of cancellation, either signaled (false) or nonsignaled (true). |
int my_timer_create | ( | my_timer_t * | timer | ) |
Create a timer object.
timer | Location where the timer ID is returned. |
void my_timer_deinitialize | ( | void | ) |
Release any resources that were allocated as part of initialization.
void my_timer_delete | ( | my_timer_t * | timer | ) |
Delete a timer object.
timer | Timer object. |
int my_timer_initialize | ( | void | ) |
Initialize internal components.
int my_timer_set | ( | my_timer_t * | timer, |
unsigned long | time | ||
) |
Set the time until the next expiration of the timer.
timer | Timer object. |
time | Amount of time (in milliseconds) before the timer expires. |
|
static |
Timer expiration notification thread.
arg | Event info. |