X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_clock_gettimeofday.h;h=97d08ea069aadb5fb3bc76dc3bb74be68b4262aa;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;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..97d08ea 100644 --- a/ETL/trunk/ETL/_clock_gettimeofday.h +++ b/ETL/trunk/ETL/_clock_gettimeofday.h @@ -1,7 +1,7 @@ /*! ======================================================================== ** Extended Template and Library ** gettimeofday() Clock Description Implementation -** $Id: _clock_gettimeofday.h,v 1.1.1.1 2005/01/04 01:31:46 darco Exp $ +** $Id$ ** ** Copyright (c) 2002 Robert B. Quattlebaum Jr. ** @@ -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