Flipper Zero Firmware
Loading...
Searching...
No Matches
event_loop_timer.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "event_loop.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
21
32typedef void (*FuriEventLoopTimerCallback)(void* context);
33
38
49 FuriEventLoop* instance,
52 void* context);
53
64
71void furi_event_loop_timer_start(FuriEventLoopTimer* timer, uint32_t interval);
72
79
88
98
106
115
116#ifdef __cplusplus
117}
118#endif
Furi Event Loop.
FuriEventLoopTimerType
Enumeration of possible timer types.
Definition event_loop_timer.h:17
@ FuriEventLoopTimerTypePeriodic
Repeating timer.
Definition event_loop_timer.h:19
@ FuriEventLoopTimerTypeOnce
One-shot timer.
Definition event_loop_timer.h:18
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:147
void(* FuriEventLoopTimerCallback)(void *context)
Timer callback type for functions to be called when a timer expires.
Definition event_loop_timer.h:32
void furi_event_loop_timer_restart(FuriEventLoopTimer *timer)
Restart a timer with the previously set interval.
Definition event_loop_timer.c:186
void furi_event_loop_timer_stop(FuriEventLoopTimer *timer)
Stop a timer without firing its callback.
Definition event_loop_timer.c:195
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:177
bool furi_event_loop_timer_is_running(const FuriEventLoopTimer *timer)
Check if the timer is currently running.
Definition event_loop_timer.c:212
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:202
void furi_event_loop_timer_free(FuriEventLoopTimer *timer)
Delete an event loop timer instance.
Definition event_loop_timer.c:170
uint32_t furi_event_loop_timer_get_interval(const FuriEventLoopTimer *timer)
Get the timer interval.
Definition event_loop_timer.c:207
Definition event_loop_i.h:78
Definition event_loop_timer_i.h:14