Loading...
Searching...
No Matches
event_loop_timer.h
Go to the documentation of this file.
1
9#pragma once
10
11#include "event_loop.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
24
35typedef void (*FuriEventLoopTimerCallback)(void* context);
36
41
52 FuriEventLoop* instance,
55 void* context);
56
67
74void furi_event_loop_timer_start(FuriEventLoopTimer* timer, uint32_t interval);
75
82
91
101
109
118
119#ifdef __cplusplus
120}
121#endif
Furi Event Loop.
FuriEventLoopTimerType
Enumeration of possible timer types.
Definition event_loop_timer.h:20
@ FuriEventLoopTimerTypePeriodic
Repeating timer.
Definition event_loop_timer.h:22
@ FuriEventLoopTimerTypeOnce
One-shot timer.
Definition event_loop_timer.h:21
FuriEventLoopTimer * furi_event_loop_timer_alloc(FuriEventLoop *instance, FuriEventLoopTimerCallback callback, FuriEventLoopTimerType type, void *context)
Create a new event loop timer instance.
Definition event_loop_timer.c:150
void(* FuriEventLoopTimerCallback)(void *context)
Timer callback type for functions to be called when a timer expires.
Definition event_loop_timer.h:35
void furi_event_loop_timer_restart(FuriEventLoopTimer *timer)
Restart a timer with the previously set interval.
Definition event_loop_timer.c:189
void furi_event_loop_timer_stop(FuriEventLoopTimer *timer)
Stop a timer without firing its callback.
Definition event_loop_timer.c:198
void furi_event_loop_timer_start(FuriEventLoopTimer *timer, uint32_t interval)
Start a timer or restart it with a new interval.
Definition event_loop_timer.c:180
bool furi_event_loop_timer_is_running(const FuriEventLoopTimer *timer)
Check if the timer is currently running.
Definition event_loop_timer.c:215
uint32_t furi_event_loop_timer_get_remaining_time(const FuriEventLoopTimer *timer)
Get the time remaining before the timer becomes expires.
Definition event_loop_timer.c:205
void furi_event_loop_timer_free(FuriEventLoopTimer *timer)
Delete an event loop timer instance.
Definition event_loop_timer.c:173
uint32_t furi_event_loop_timer_get_interval(const FuriEventLoopTimer *timer)
Get the timer interval.
Definition event_loop_timer.c:210
Definition event_loop_i.h:78
Definition event_loop_timer_i.h:14