#include "my_config.h"
#include <time.h>
Go to the source code of this file.
◆ os_timer_t
◆ my_timer_cancel()
int my_timer_cancel |
( |
my_timer_t * |
timer, |
|
|
int * |
state |
|
) |
| |
Cancel the timer.
- Parameters
-
timer | Timer object. |
state | The state of the timer at the time of cancellation, either signaled (false) or nonsignaled (true). |
- Returns
- On success, 0. On error, -1 is returned, and errno is set to indicate the error.
◆ my_timer_create()
Create a timer object.
- Parameters
-
timer | Location where the timer ID is returned. |
- Returns
- On success, 0. On error, -1 is returned, and errno is set to indicate the error.
◆ my_timer_deinitialize()
void my_timer_deinitialize |
( |
| ) |
|
Release any resources that were allocated as part of initialization.
◆ my_timer_delete()
Delete a timer object.
- Parameters
-
◆ my_timer_initialize()
int my_timer_initialize |
( |
void |
| ) |
|
Initialize internal components.
- Returns
- On success, 0. On error, -1 is returned, and errno is set to indicate the error.
◆ my_timer_set()
int my_timer_set |
( |
my_timer_t * |
timer, |
|
|
unsigned long |
time |
|
) |
| |
Set the time until the next expiration of the timer.
- Parameters
-
timer | Timer object. |
time | Amount of time (in milliseconds) before the timer expires. |
- Returns
- On success, 0. On error, -1 is returned, and errno is set to indicate the error.