14 #define GET_TIME() PIL_check_seconds_timer()
37 double first_interval,
41 timed_func->
func = func;
47 timed_func->
uuid = uuid;
63 if (timed_func->uuid == uuid && !timed_func->tag_removal) {
64 timed_func->tag_removal =
true;
75 if (timed_func->uuid == uuid && !timed_func->tag_removal) {
87 if (timed_func->tag_removal) {
90 if (timed_func->next_time > current_time) {
94 double ret = timed_func->func(timed_func->uuid, timed_func->user_data);
97 timed_func->tag_removal =
true;
100 timed_func->next_time = current_time +
ret;
109 if (timed_func->tag_removal) {
126 timed_func->tag_removal =
true;
135 if (!timed_func->persistent) {
136 timed_func->tag_removal =
true;
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
static TimerContainer GlobalTimer
static void clear_user_data(TimedFunction *timed_func)
bool BLI_timer_is_registered(uintptr_t uuid)
void BLI_timer_register(uintptr_t uuid, BLI_timer_func func, void *user_data, BLI_timer_data_free user_data_free, double first_interval, bool persistent)
static void remove_tagged_functions(void)
static void execute_functions_if_necessary(void)
struct TimerContainer TimerContainer
struct TimedFunction TimedFunction
bool BLI_timer_unregister(uintptr_t uuid)
static void remove_non_persistent_functions(void)
void BLI_timer_on_file_load(void)
void(* BLI_timer_data_free)(uintptr_t uuid, void *user_data)
double(* BLI_timer_func)(uintptr_t uuid, void *user_data)
Read Guarded memory(de)allocation.
Platform independent time functions.
void *(* MEM_callocN)(size_t len, const char *str)
_W64 unsigned int uintptr_t
BLI_timer_data_free user_data_free
struct TimedFunction * prev
struct TimedFunction * next