MCPcopy Create free account
hub / github.com/OpenPrinting/cups / main

Function main

cups/testgetdests.c:23–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 */
22
23int /* O - Exit status */
24main(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}

Callers

nothing calls this directly

Calls 2

cupsGetDestsFunction · 0.85
cupsFreeDestsFunction · 0.85

Tested by

no test coverage detected