# rcsdiff -r1.1 ping_common.c
===============================================================
RCS file: ping_common.c,v
retrieving revision 1.1
diff -r1.1 ping_common.c
1c1
< #include "ping_common.h"
- - -
> #include "ping_common.h"
29c29
< struct timeval start_time, cur_time;
- - -
> struct timespec start_time, cur_time;
262c262
< struct itimerval it;
- - -
> struct itimerspec it;
278c278
< it.it_interval.tv_usec = 0;
- - -
> it.it_interval.tv_nsec = 0;
280c280
< it.it_value.tv_usec = waittime%1000000;
- - -
> it.it_value.tv_nsec = waittime%1000000000;
300,301c300,302
< struct timeval tv;
< gettimeofday(&tv, NULL);
- - -
> struct timespec tv;
> // gettimeofday(&tv, NULL);
> clock_gettime( CLOCK_REALTIME, &tv);
303c304
< (unsigned long)tv.tv_sec, (unsigned long)tv.tv_usec);
- - -
> (unsigned long)tv.tv_sec, (unsigned long)tv.tv_nsec);
312c313
< * of the data portion are used to hold a UNIX "timeval" struct in VAX
- - -
> * of the data portion are used to hold a UNIX "timespec" struct in VAX
327c328,329
< gettimeofday(&cur_time, NULL);
- - -
48 ISSN 0236-3933. Вестник МГТУ им. Н.Э. Баумана. Сер. “Приборостроение”. 2012. № 4