X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_clock_gettimeofday.h;h=525aac824fa122bfa0c4c3a8e1f1e2b8e8ac51be;hb=0809ba8eb14cf885c8f197d751c80cced84d9676;hp=8626c73783d8754bfb355af0bb2d084f298a1841;hpb=b3016b249333ac0ab0008d8c6c4d9029b2ff30c9;p=synfig.git diff --git a/ETL/trunk/ETL/_clock_gettimeofday.h b/ETL/trunk/ETL/_clock_gettimeofday.h index 8626c73..525aac8 100644 --- a/ETL/trunk/ETL/_clock_gettimeofday.h +++ b/ETL/trunk/ETL/_clock_gettimeofday.h @@ -66,17 +66,17 @@ protected: { timestamp(int sec, int usec) { tv_sec=sec; tv_usec=usec; } - - friend class clock_desc_gettimeofday; + + friend class clock_desc_gettimeofday; public: timestamp() { } - - + + inline timestamp operator-(const timestamp &rhs)const { timestamp ret; ret.tv_usec=tv_usec-rhs.tv_usec; - + if(ret.tv_usec<0) { ret.tv_sec=tv_sec-rhs.tv_sec-1; @@ -87,10 +87,10 @@ protected: return ret; } - inline timestamp &operator+(timestamp rhs)const + inline timestamp operator+(timestamp rhs)const { rhs.tv_usec+=tv_usec; - + if(rhs.tv_usec>1000000) { rhs.tv_sec+=tv_sec+1; @@ -100,7 +100,7 @@ protected: rhs.tv_sec+=tv_sec; return rhs; } - + inline bool operator<(const timestamp &rhs)const { return tv_sec