Changes in uspace/app/tester/ipc/ping_pong.c [205f1add:a35b458] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/ipc/ping_pong.c
r205f1add ra35b458 29 29 #include <stdio.h> 30 30 #include <stdlib.h> 31 #include < time.h>31 #include <sys/time.h> 32 32 #include <ns.h> 33 33 #include <async.h> … … 42 42 TPRINTF("Pinging ns server for %d seconds...", DURATION_SECS); 43 43 44 struct time specstart;45 get uptime(&start);44 struct timeval start; 45 gettimeofday(&start, NULL); 46 46 47 47 uint64_t count = 0; 48 48 while (true) { 49 struct time specnow;50 get uptime(&now);49 struct timeval now; 50 gettimeofday(&now, NULL); 51 51 52 if ( NSEC2SEC(ts_sub_diff(&now, &start)) >= DURATION_SECS)52 if (tv_sub_diff(&now, &start) >= DURATION_SECS * 1000000L) 53 53 break; 54 54
Note:
See TracChangeset
for help on using the changeset viewer.