#include <stdlib.h>
#include <amxc/amxc.h>
#include <amxc/amxc_macros.h>
#include <amxp/amxp.h>
Go to the source code of this file.
◆ _GNU_SOURCE
◆ amxp_timer_free_it()
static void amxp_timer_free_it |
( |
amxc_llist_it_t * |
it | ) |
|
|
static |
◆ amxp_timer_get_elapsed_time()
static struct timeval amxp_timer_get_elapsed_time |
( |
void |
| ) |
|
|
static |
Definition at line 69 of file amxp_timer.c.
76 struct timeval elapsed = { 0, 0 };
83 getitimer(ITIMER_REAL, &ti);
84 if(timerisset(&ti.it_value)) {
85 timersub(&
current, &ti.it_value, &elapsed);
static struct timeval current
◆ amxp_timer_start_timer()
static void amxp_timer_start_timer |
( |
amxp_timer_t * |
timer, |
|
|
struct timeval * |
smallest |
|
) |
| |
|
static |
Definition at line 101 of file amxp_timer.c.
104 if(!timerisset(smallest) || timercmp(smallest, &timer->
timer.it_value, >)) {
105 (*smallest) = timer->
timer.it_value;
◆ amxp_timer_update()
static bool amxp_timer_update |
( |
amxp_timer_t * |
timer, |
|
|
struct timeval * |
smallest, |
|
|
struct timeval * |
elapsed |
|
) |
| |
|
static |
Definition at line 110 of file amxp_timer.c.
113 timersub(&timer->
timer.it_value, elapsed, &timer->
timer.it_value);
114 if(!((timer->
timer.it_value.tv_sec < 0) ||
115 !timerisset(&timer->
timer.it_value))) {
118 if(!timerisset(smallest) ||
119 timercmp(smallest, &timer->
timer.it_value, >)) {
120 (*smallest) = timer->
timer.it_value;
130 if(timerisset(&timer->
timer.it_interval)) {
131 timer->
timer.it_value = timer->
timer.it_interval;
133 if(!timerisset(smallest) ||
134 timercmp(smallest, &timer->
timer.it_value, >)) {
135 (*smallest) = timer->
timer.it_value;
◆ amxp_timer_update_current()
static void amxp_timer_update_current |
( |
struct timeval * |
elapsed | ) |
|
|
static |
◆ CONSTRUCTOR_LVL()
◆ DESTRUCTOR_LVL()
Definition at line 342 of file amxp_timer.c.
static void amxp_timer_free_it(amxc_llist_it_t *it)
◆ current
◆ timers
◆ timers_enabled
bool timers_enabled = true |
|
static |