| 841 | |
| 842 | |
| 843 | static void close_alerts() |
| 844 | { |
| 845 | /* We only attempt this every 5 seconds or so, because it is not a cheap |
| 846 | * operation, and we will catch the alerts eventually. This check uses |
| 847 | * floats as some compilers define CLOCKS_PER_SEC as a float or double. |
| 848 | */ |
| 849 | if ( ( (float)clock() / (float)( CLOCKS_PER_SEC * 5 ) ) < ( 1.0 / 5.0 ) ) |
| 850 | { |
| 851 | int i; |
| 852 | for ( i = 0; i < globs.jobs; ++i ) |
| 853 | if ( cmdtab[ i ].pi.hProcess ) |
| 854 | close_alert( &cmdtab[ i ].pi ); |
| 855 | } |
| 856 | } |
| 857 | |
| 858 | |
| 859 | /* |
no test coverage detected