Blender
V3.3
|
#include "BLI_timer.h"
#include "BLI_listbase.h"
#include "MEM_guardedalloc.h"
#include "PIL_time.h"
Go to the source code of this file.
Classes | |
struct | TimedFunction |
struct | TimerContainer |
Macros | |
#define | GET_TIME() PIL_check_seconds_timer() |
Typedefs | |
typedef struct TimedFunction | TimedFunction |
typedef struct TimerContainer | TimerContainer |
Functions | |
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 | clear_user_data (TimedFunction *timed_func) |
bool | BLI_timer_unregister (uintptr_t uuid) |
bool | BLI_timer_is_registered (uintptr_t uuid) |
static void | execute_functions_if_necessary (void) |
static void | remove_tagged_functions (void) |
void | BLI_timer_execute () |
void | BLI_timer_free () |
static void | remove_non_persistent_functions (void) |
void | BLI_timer_on_file_load (void) |
Variables | |
static TimerContainer | GlobalTimer = {{0}} |
#define GET_TIME | ( | ) | PIL_check_seconds_timer() |
Definition at line 14 of file BLI_timer.c.
typedef struct TimedFunction TimedFunction |
typedef struct TimerContainer TimerContainer |
Execute all registered functions that are due.
Definition at line 117 of file BLI_timer.c.
References execute_functions_if_necessary(), and remove_tagged_functions().
Referenced by wm_event_execute_timers().
Definition at line 123 of file BLI_timer.c.
References TimerContainer::funcs, GlobalTimer, LISTBASE_FOREACH, and remove_tagged_functions().
Referenced by WM_exit_ex().
Definition at line 72 of file BLI_timer.c.
References TimerContainer::funcs, GlobalTimer, and LISTBASE_FOREACH.
Referenced by bpy_app_timers_is_registered().
Definition at line 141 of file BLI_timer.c.
References remove_non_persistent_functions().
Referenced by wm_file_read_pre().
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 | ||
) |
Definition at line 33 of file BLI_timer.c.
References BLI_addtail(), TimedFunction::func, TimerContainer::funcs, GET_TIME, GlobalTimer, MEM_callocN, TimedFunction::next_time, TimedFunction::persistent, TimedFunction::tag_removal, TimedFunction::user_data, user_data, TimedFunction::user_data_free, and TimedFunction::uuid.
Referenced by bpy_app_timers_register().
Returns False when the timer does not exist (anymore).
Definition at line 60 of file BLI_timer.c.
References clear_user_data(), TimerContainer::funcs, GlobalTimer, and LISTBASE_FOREACH.
Referenced by bpy_app_timers_unregister().
|
static |
Definition at line 52 of file BLI_timer.c.
References NULL, TimedFunction::user_data, TimedFunction::user_data_free, and TimedFunction::uuid.
Referenced by BLI_timer_unregister(), and remove_tagged_functions().
Definition at line 82 of file BLI_timer.c.
References TimerContainer::funcs, GET_TIME, GlobalTimer, LISTBASE_FOREACH, and ret.
Referenced by BLI_timer_execute().
Definition at line 132 of file BLI_timer.c.
References TimerContainer::funcs, GlobalTimer, and LISTBASE_FOREACH.
Referenced by BLI_timer_on_file_load().
Definition at line 105 of file BLI_timer.c.
References BLI_freelinkN(), clear_user_data(), ListBase::first, TimerContainer::funcs, GlobalTimer, and next.
Referenced by BLI_timer_execute(), and BLI_timer_free().
|
static |
Definition at line 31 of file BLI_timer.c.
Referenced by BLI_timer_free(), BLI_timer_is_registered(), BLI_timer_register(), BLI_timer_unregister(), execute_functions_if_necessary(), remove_non_persistent_functions(), and remove_tagged_functions().