diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-03-04 18:24:44 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-03-04 18:24:44 +0000 |
| commit | e3eaeb0f5ca141476767f265dafbef1744d5af62 (patch) | |
| tree | 495c2b3c84dfd26d0ad54511afcf7a916d9a52f2 | |
| parent | b13c3932e4c8c22375be2b6723eaf426b83e9b07 (diff) | |
Put fl_elapsed() call before loop in Fl::add_timeout().
git-svn-id: file:///fltk/svn/fltk/trunk@362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 6f5a05a1f..d35533080 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.22 1999/03/03 07:47:22 bill Exp $" +// "$Id: Fl.cxx,v 1.23 1999/03/04 18:24:44 mike Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -79,6 +79,9 @@ static int numtimeouts; void Fl::add_timeout(double t, void (*cb)(void *), void *v) { int i; + + fl_elapsed(); + if (numtimeouts<MAXTIMEOUT) numtimeouts++; for (i=0; i<(numtimeouts-1); i++) { if (timeout[i].time > t) { @@ -87,8 +90,6 @@ void Fl::add_timeout(double t, void (*cb)(void *), void *v) { } } - fl_elapsed(); - timeout[i].time = t; timeout[i].cb = cb; timeout[i].arg = v; @@ -682,5 +683,5 @@ int fl_old_shortcut(const char* s) { } // -// End of "$Id: Fl.cxx,v 1.22 1999/03/03 07:47:22 bill Exp $". +// End of "$Id: Fl.cxx,v 1.23 1999/03/04 18:24:44 mike Exp $". // |
