Changes in uspace/app/tester/ipc/ping_pong.c [a35b458:5a6cc679] in mainline
- File:
-
- 1 edited
-
uspace/app/tester/ipc/ping_pong.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/ipc/ping_pong.c
ra35b458 r5a6cc679 41 41 { 42 42 TPRINTF("Pinging ns server for %d seconds...", DURATION_SECS); 43 43 44 44 struct timeval start; 45 45 gettimeofday(&start, NULL); 46 46 47 47 uint64_t count = 0; 48 48 while (true) { 49 49 struct timeval now; 50 50 gettimeofday(&now, NULL); 51 51 52 52 if (tv_sub_diff(&now, &start) >= DURATION_SECS * 1000000L) 53 53 break; 54 54 55 55 size_t i; 56 56 for (i = 0; i < COUNT_GRANULARITY; i++) { 57 57 errno_t retval = ns_ping(); 58 58 59 59 if (retval != EOK) { 60 60 TPRINTF("\n"); … … 62 62 } 63 63 } 64 64 65 65 count += COUNT_GRANULARITY; 66 66 } 67 67 68 68 TPRINTF("OK\nCompleted %" PRIu64 " round trips in %u seconds, %" PRIu64 " rt/s.\n", 69 69 count, DURATION_SECS, count / DURATION_SECS); 70 70 71 71 return NULL; 72 72 }
Note:
See TracChangeset
for help on using the changeset viewer.
