summaryrefslogtreecommitdiff
path: root/src/Fl_Timeout.h
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-06-17 17:05:10 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-06-17 17:05:10 +0200
commitf3bf231cc06ab82576b798a1f615981924a2903c (patch)
treeb9d00b2b6c8a1ea1fc3c5385401f0e25f579cccf /src/Fl_Timeout.h
parentd8eb1f9ca465ca685a67203df38616a13bd82bb4 (diff)
Improve reliability of timeout handling (#450, part 1)
This commit prevents "timer loops" without intermediate event handling if callback handling takes longer than the timer delay of repeating timers. For more details see GitHub issue #450.
Diffstat (limited to 'src/Fl_Timeout.h')
-rw-r--r--src/Fl_Timeout.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_Timeout.h b/src/Fl_Timeout.h
index 610f00067..8cff84689 100644
--- a/src/Fl_Timeout.h
+++ b/src/Fl_Timeout.h
@@ -51,6 +51,7 @@ protected:
Fl_Timeout_Handler callback; // the user's callback
void *data; // the user's callback data
double time; // delay until timeout
+ int skip; // skip "new" (inserted) timers (issue #450)
// constructor
Fl_Timeout() {
@@ -58,6 +59,7 @@ protected:
callback = 0;
data = 0;
time = 0;
+ skip = 0;
}
~Fl_Timeout() {}