Files | |
| file | cb_tmevent.h |
| Timer and events utility functions. | |
Functions | |
| static int | cb_nanosleep64 (int64_t ts64, int64_t *rts64) |
| nano second unit sleep More... | |
| cb_timer_object_t * | cb_timer_create (char *tname) |
| creates timer. More... | |
| void | cb_timer_close (cb_timer_object_t *mtmo) |
| close the timer More... | |
| int | cb_timer_start_interval (cb_timer_object_t *mtmo, uint32_t value_ms, uint32_t interval_ms) |
| start timer interval. More... | |
| int | cb_timer_stop (cb_timer_object_t *mtmo) |
| timer stop. More... | |
| bool | cb_timer_expired (cb_timer_object_t *mtmo, cb_timer_clear_t clear) |
| timer expired More... | |
Typedefs | |
| typedef struct cb_timer_object | cb_timer_object_t |
| handler for cb_timer_object More... | |
Enumerations | |
| enum | cb_timer_clear_t { CB_TIMER_NO_CLEAR, CB_TIMER_DECREMENT, CB_TIMER_ALL_CLEAR } |
| enumeration used for timer to clear, decrement or no clear. This enumeration has following members: More... | |
Macros | |
| #define | CB_USLEEP(x) usleep(x) |
| micro second unit sleep More... | |
| #define | CB_SLEEP(x) sleep(x) |
| second unit sleep More... | |
| #define | CB_MKTIME(x) mktime(x) |
| seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC) More... | |
| #define CB_USLEEP | ( | x | ) | usleep(x) |
micro second unit sleep
| #define CB_SLEEP | ( | x | ) | sleep(x) |
second unit sleep
| #define CB_MKTIME | ( | x | ) | mktime(x) |
seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)
| typedef struct cb_timer_object cb_timer_object_t |
handler for cb_timer_object
| enum cb_timer_clear_t |
|
inlinestatic |
nano second unit sleep
| cb_timer_object_t* cb_timer_create | ( | char * | tname | ) |
creates timer.
| tname | timer name |
| void cb_timer_close | ( | cb_timer_object_t * | mtmo | ) |
close the timer
| mtmo | reference to cb_timer_object_t, returned by cb_timer_create(). |
| int cb_timer_start_interval | ( | cb_timer_object_t * | mtmo, |
| uint32_t | value_ms, | ||
| uint32_t | interval_ms | ||
| ) |
start timer interval.
| mtmo | reference to cb_timer_object_t, created and returned by cb_timer_create(). |
| value_ms | initial value in msec. |
| interval_ms | time interval in msec. |
| int cb_timer_stop | ( | cb_timer_object_t * | mtmo | ) |
timer stop.
| mtmo | reference to cb_timer_object_t, which is created and returned by cb_timer_create(). |
| bool cb_timer_expired | ( | cb_timer_object_t * | mtmo, |
| cb_timer_clear_t | clear | ||
| ) |
timer expired
| mtmo | reference to cb_timer_object_t, which is created and returned by cb_timer_create(). |
| clear | action by the definition of cb_timer_clear_t |