Blender V4.5
BLI_timer.cc File Reference
#include "BLI_timer.h"
#include "BLI_listbase.h"
#include "BLI_time.h"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Classes

struct  TimedFunction
struct  TimerContainer

Macros

#define GET_TIME()

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 ()
static void remove_tagged_functions ()
void BLI_timer_execute ()
void BLI_timer_free ()
static void remove_non_persistent_functions ()
void BLI_timer_on_file_load ()

Variables

static TimerContainer GlobalTimer = {{nullptr}}

Macro Definition Documentation

◆ GET_TIME

#define GET_TIME ( )
Value:
double BLI_time_now_seconds(void)
Definition time.cc:65

Definition at line 15 of file BLI_timer.cc.

Referenced by BLI_timer_register(), and execute_functions_if_necessary().

Function Documentation

◆ BLI_timer_execute()

void BLI_timer_execute ( void )

Execute all registered functions that are due.

Definition at line 120 of file BLI_timer.cc.

References BLI_timer_execute(), execute_functions_if_necessary(), and remove_tagged_functions().

Referenced by BLI_timer_execute(), and wm_event_timers_execute().

◆ BLI_timer_free()

void BLI_timer_free ( void )

◆ BLI_timer_is_registered()

bool BLI_timer_is_registered ( uintptr_t uuid)

◆ BLI_timer_on_file_load()

void BLI_timer_on_file_load ( void )

◆ BLI_timer_register()

◆ BLI_timer_unregister()

bool BLI_timer_unregister ( uintptr_t uuid)

Returns False when the timer does not exist (anymore).

Definition at line 61 of file BLI_timer.cc.

References BLI_timer_unregister(), clear_user_data(), TimerContainer::funcs, GlobalTimer, and LISTBASE_FOREACH.

Referenced by BLI_timer_unregister(), and bpy_app_timers_unregister().

◆ clear_user_data()

void clear_user_data ( TimedFunction * timed_func)
static

◆ execute_functions_if_necessary()

void execute_functions_if_necessary ( )
static

◆ remove_non_persistent_functions()

void remove_non_persistent_functions ( )
static

◆ remove_tagged_functions()

Variable Documentation

◆ GlobalTimer