| 21 | */ |
| 22 | |
| 23 | int /* O - Exit status */ |
| 24 | main(void) |
| 25 | { |
| 26 | int num_dests; /* Number of destinations */ |
| 27 | cups_dest_t *dests; /* Destinations */ |
| 28 | struct timeval start, end; /* Start and stop time */ |
| 29 | double secs; /* Total seconds to run cupsGetDests */ |
| 30 | |
| 31 | |
| 32 | for (;;) |
| 33 | { |
| 34 | gettimeofday(&start, NULL); |
| 35 | num_dests = cupsGetDests(&dests); |
| 36 | gettimeofday(&end, NULL); |
| 37 | secs = end.tv_sec - start.tv_sec + 0.000001 * (end.tv_usec - start.tv_usec); |
| 38 | |
| 39 | printf("Found %d printers in %.3f seconds...\n", num_dests, secs); |
| 40 | |
| 41 | cupsFreeDests(num_dests, dests); |
| 42 | sleep(1); |
| 43 | } |
| 44 | |
| 45 | return (0); |
| 46 | } |
nothing calls this directly
no test coverage detected