Change FOREVER back to 1e20 (minimal CPU usage) and change fl_wait()

implementation on WIN32 to check for idle and to use a time_to_wait()
of 0... (STR #1120)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4704 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2005-12-14 01:25:21 +00:00
parent f4b83b81ba
commit cbb4918f41
2 changed files with 3 additions and 1 deletions

View File

@ -449,7 +449,7 @@ double Fl::wait(double time_to_wait) {
#endif
}
#define FOREVER 0.01 //1e20
#define FOREVER 1e20
int Fl::run() {
while (Fl_X::first) wait(FOREVER);

View File

@ -257,6 +257,8 @@ int fl_wait(double time_to_wait) {
}
#endif // USE_ASYNC_SELECT
if (Fl::idle) time_to_wait = 0.0;
fl_unlock_function();
time_to_wait = (time_to_wait > 10000 ? 10000 : time_to_wait);