X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_clock_gettimeofday.h;h=97d08ea069aadb5fb3bc76dc3bb74be68b4262aa;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=ab6a77076f19a269f9e5d85ed76b346b390804a6;hpb=117425a5858bb094f2e54af5d018499ab703b227;p=synfig.git diff --git a/ETL/trunk/ETL/_clock_gettimeofday.h b/ETL/trunk/ETL/_clock_gettimeofday.h index ab6a770..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; @@ -90,7 +90,7 @@ protected: 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