From ee43155a4bedc6f9e2eafd2e2af00b85e92ad2be Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 28 Nov 2025 00:55:48 +0100 Subject: Add method to list running timeouts (#1306). \see Fl::timeout_list(); --- src/Fl_Timeout.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Fl_Timeout.cxx') diff --git a/src/Fl_Timeout.cxx b/src/Fl_Timeout.cxx index 9aa89b839..4ba8a0f63 100644 --- a/src/Fl_Timeout.cxx +++ b/src/Fl_Timeout.cxx @@ -344,6 +344,17 @@ int Fl_Timeout::remove_next_timeout(Fl_Timeout_Handler cb, void *data, void **da return ret; } +std::vector Fl_Timeout::timeout_list() { + std::vector v; + const Fl_Timeout *t = first_timeout; + while (t) { + v.push_back( { t->time, t->callback, t->data } ); + t = t->next; + } + return v; +} + + /** Remove the timeout from the active timer queue and push it onto the stack of currently running callbacks. -- cgit v1.2.3