mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
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:
+1
-1
@@ -449,7 +449,7 @@ double Fl::wait(double time_to_wait) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FOREVER 0.01 //1e20
|
#define FOREVER 1e20
|
||||||
|
|
||||||
int Fl::run() {
|
int Fl::run() {
|
||||||
while (Fl_X::first) wait(FOREVER);
|
while (Fl_X::first) wait(FOREVER);
|
||||||
|
|||||||
@@ -257,6 +257,8 @@ int fl_wait(double time_to_wait) {
|
|||||||
}
|
}
|
||||||
#endif // USE_ASYNC_SELECT
|
#endif // USE_ASYNC_SELECT
|
||||||
|
|
||||||
|
if (Fl::idle) time_to_wait = 0.0;
|
||||||
|
|
||||||
fl_unlock_function();
|
fl_unlock_function();
|
||||||
|
|
||||||
time_to_wait = (time_to_wait > 10000 ? 10000 : time_to_wait);
|
time_to_wait = (time_to_wait > 10000 ? 10000 : time_to_wait);
|
||||||
|
|||||||
Reference in New Issue
Block a user