From 64421d8ff7961a2edb3fc0deac128522653bc82a Mon Sep 17 00:00:00 2001 From: Jamie Greunbaum Date: Sat, 26 Sep 2026 01:34:33 -0400 Subject: [PATCH] Added a macro to easily call functions on a timer. --- src/liborng/orng_macros.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/liborng/orng_macros.h b/src/liborng/orng_macros.h index 2c50b97..028e117 100644 --- a/src/liborng/orng_macros.h +++ b/src/liborng/orng_macros.h @@ -34,8 +34,10 @@ /** * Deferred function helpers */ +#define CALL_ON_TIMEOUT(T,C) \ + this->get_tree()->create_timer(T)->connect("timeout", C) #define CALL_NEXT_FRAME(C) \ - this->get_tree()->create_timer(SMALL_NUMBER)->connect("timeout", C) + CALL_ON_TIMEOUT(SMALL_NUMBER,C) /**