| 941 | |
| 942 | |
| 943 | static void close_alerts() |
| 944 | { |
| 945 | /* We only attempt this every 5 seconds or so, because it is not a cheap |
| 946 | * operation, and we will catch the alerts eventually. This check uses |
| 947 | * floats as some compilers define CLOCKS_PER_SEC as a float or double. |
| 948 | */ |
| 949 | if ( ( (float)clock() / (float)( CLOCKS_PER_SEC * 5 ) ) < ( 1.0 / 5.0 ) ) |
| 950 | { |
| 951 | int32_t i; |
| 952 | for ( i = 0; i < globs.jobs; ++i ) |
| 953 | if ( cmdtab[ i ].pi.hProcess ) |
| 954 | close_alert( &cmdtab[ i ].pi ); |
| 955 | } |
| 956 | } |
| 957 | |
| 958 | |
| 959 | /* |
no test coverage detected