27 #ifndef __ETL__CLOCK_GETTIMEOFDAY_H
28 #define __ETL__CLOCK_GETTIMEOFDAY_H
62 {
return "UNIX gettimeofday()"; };
68 { tv_sec=sec; tv_usec=usec; }
78 ret.tv_usec=tv_usec-rhs.tv_usec;
82 ret.tv_sec=tv_sec-rhs.tv_sec-1;
86 ret.tv_sec=tv_sec-rhs.tv_sec;
94 if(rhs.tv_usec>1000000)
105 {
return tv_sec<rhs.tv_sec || tv_usec<rhs.tv_usec; }
108 {
return tv_usec==rhs.tv_usec && tv_sec==rhs.tv_sec; }
111 {
return tv_usec!=rhs.tv_usec || tv_sec!=rhs.tv_sec; }
116 { gettimeofday(&x,
NULL);}