| 163 | | (void) ContinueTimer(timer); |
| 164 | | } |
| 165 | | for (j=0; j < (long) (concurrent == MagickFalse ? iterations : 1); j++) |
| 166 | | { |
| 167 | | if (status == MagickFalse) |
| 168 | | break; |
| 169 | | if (duration > 0) |
| 170 | | { |
| 171 | | if (GetElapsedTime(timer) > duration) |
| 172 | | break; |
| 173 | | (void) ContinueTimer(timer); |
| 174 | | } |
| 175 | | status=command(image_info,argc,argv,metadata,exception); |
| 176 | | # pragma omp critical (MagickCore_Launch_Command) |
| 177 | | { |
| | 155 | if (duration > 0) |
| | 156 | { |
| | 157 | if (GetElapsedTime(timer) > duration) |
| | 158 | continue; |
| | 159 | (void) ContinueTimer(timer); |
| | 160 | } |
| | 161 | status=command(image_info,argc,argv,metadata,exception); |
| 193 | | } |
| | 177 | else |
| | 178 | { |
| | 179 | SetOpenMPNested(1); |
| | 180 | #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203) |
| | 181 | # pragma omp parallel for shared(status) |
| | 182 | #endif |
| | 183 | for (i=0; i < (long) iterations; i++) |
| | 184 | { |
| | 185 | if (status == MagickFalse) |
| | 186 | continue; |
| | 187 | if (duration > 0) |
| | 188 | { |
| | 189 | if (GetElapsedTime(timer) > duration) |
| | 190 | continue; |
| | 191 | (void) ContinueTimer(timer); |
| | 192 | } |
| | 193 | status=command(image_info,argc,argv,metadata,exception); |
| | 194 | #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203) |
| | 195 | # pragma omp critical (MagickCore_Launch_Command) |
| | 196 | #endif |
| | 197 | { |
| | 198 | if (exception->severity != UndefinedException) |
| | 199 | { |
| | 200 | if ((exception->severity > ErrorException) || |
| | 201 | (regard_warnings != MagickFalse)) |
| | 202 | status=MagickTrue; |
| | 203 | CatchException(exception); |
| | 204 | } |
| | 205 | if ((metadata != (char **) NULL) && (*metadata != (char *) NULL)) |
| | 206 | { |
| | 207 | (void) fputs(*metadata,stdout); |
| | 208 | (void) fputc('\n',stdout); |
| | 209 | *metadata=DestroyString(*metadata); |
| | 210 | } |
| | 211 | } |
| | 212 | } |
| | 213 | } |