|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
Generic struct for joinable timers. More...
#include <infineon/ifx-timer.h>
Data Fields | |
| void * | _start |
Private member for start of timer as void* to be as generic as possible. | |
| uint64_t | _duration |
| Private member for duration of timer in [us]. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| ifx_status_t | ifx_timer_set (ifx_timer_t *timer, uint64_t time_us) |
| Sets Timer for given amount of [us]. | |
| bool | ifx_timer_has_elapsed (const ifx_timer_t *timer) |
| Checks if Timer has elapsed. | |
| ifx_status_t | ifx_timer_join (const ifx_timer_t *timer) |
| Waits for Timer to finish. | |
| void | ifx_timer_destroy (ifx_timer_t *timer) |
| Frees memory associated with Timer object (but not object itself). | |
Generic struct for joinable timers.
Definition at line 47 of file ifx-timer.h.
|
related |
Frees memory associated with Timer object (but not object itself).
Timer objects may contain dynamically allocated data that needs special functionality to be freed. Users would need to know the concrete type based on the linked implementation. This would negate all benefits of having a generic interface. Calling this function will ensure that all dynamically allocated members have been freed.
| [in] | timer | Timer object whose data shall be freed. |
|
related |
Checks if Timer has elapsed.
Per definition timers that have not previously been set are considered elapsed.
| [in] | timer | Timer object to be checked. |
true if timer has elapsed.
|
related |
Waits for Timer to finish.
| [in] | timer | Timer to be joined (wait until finished). |
IFX_SUCCESS if successful, any other value in case of error.
|
related |
Sets Timer for given amount of [us].
| [in] | timer | Timer object to be set. |
| [in] | time_us | us Timer duration in [us]. |
IFX_SUCCESS if successful, any other value in case of error. | uint64_t ifx_timer_t::_duration |
Private member for duration of timer in [us].
Set by ifx_timer_set(), do NOT set manually!
Definition at line 62 of file ifx-timer.h.
| void* ifx_timer_t::_start |
Private member for start of timer as void* to be as generic as possible.
Set by ifx_timer_set(), do NOT set manually!
Definition at line 55 of file ifx-timer.h.