Put fl_elapsed() call before loop in Fl::add_timeout().

git-svn-id: file:///fltk/svn/fltk/trunk@362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 1999-03-04 18:24:44 +00:00
parent b13c3932e4
commit e3eaeb0f5c

View File

@ -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 $".
//