Blender  V3.3
Typedefs | Functions
BLI_timer.h File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Typedefs

typedef double(* BLI_timer_func) (uintptr_t uuid, void *user_data)
 
typedef void(* BLI_timer_data_free) (uintptr_t uuid, void *user_data)
 

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)
 
bool BLI_timer_is_registered (uintptr_t uuid)
 
bool BLI_timer_unregister (uintptr_t uuid)
 
void BLI_timer_execute (void)
 
void BLI_timer_free (void)
 
void BLI_timer_on_file_load (void)
 

Typedef Documentation

◆ BLI_timer_data_free

typedef void(* BLI_timer_data_free) (uintptr_t uuid, void *user_data)

Definition at line 22 of file BLI_timer.h.

◆ BLI_timer_func

typedef double(* BLI_timer_func) (uintptr_t uuid, void *user_data)
Returns
A value of:
  • < 0: the timer will be removed.
  • >= 0: the timer will be called again in this number of seconds.

Definition at line 21 of file BLI_timer.h.

Function Documentation

◆ BLI_timer_execute()

void BLI_timer_execute ( void  )

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().

◆ BLI_timer_free()

void BLI_timer_free ( void  )

Definition at line 123 of file BLI_timer.c.

References TimerContainer::funcs, GlobalTimer, LISTBASE_FOREACH, and remove_tagged_functions().

Referenced by WM_exit_ex().

◆ BLI_timer_is_registered()

bool BLI_timer_is_registered ( uintptr_t  uuid)

Definition at line 72 of file BLI_timer.c.

References TimerContainer::funcs, GlobalTimer, and LISTBASE_FOREACH.

Referenced by bpy_app_timers_is_registered().

◆ BLI_timer_on_file_load()

void BLI_timer_on_file_load ( void  )

Definition at line 141 of file BLI_timer.c.

References remove_non_persistent_functions().

Referenced by wm_file_read_pre().

◆ BLI_timer_register()

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 
)

◆ BLI_timer_unregister()

bool BLI_timer_unregister ( uintptr_t  uuid)

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().