Fixed incomplete example.

Re: David Allen's post today on fltk.general



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Greg Ercolano 2016-01-25 18:41:59 +00:00
parent e8d6a11e78
commit 01e5f26f2f

22
FL/Fl.H
View File

@ -389,15 +389,19 @@ public:
stdout with a fair degree of accuracy:
\code
void callback(void*) {
puts("TICK");
Fl::repeat_timeout(1.0, callback);
}
int main() {
Fl::add_timeout(1.0, callback);
return Fl::run();
}
#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
void callback(void*) {
printf("TICK\n");
Fl::repeat_timeout(1.0, callback); // retrigger timeout
}
int main() {
Fl_Window win(100,100);
win.show();
Fl::add_timeout(1.0, callback); // set up first timeout
return Fl::run();
}
\endcode
*/
static void add_timeout(double t, Fl_Timeout_Handler,void* = 0); // platform dependent