#ifndef __TIMER_HH #define __TIMER_HH #include /** * \author cpellegrino */ class Timer : public timeval { public: // Copy constructor Timer(const Timer& t) { set(t); } Timer(long int seconds, long int useconds) { set(seconds, useconds); } // Default constructor Timer() {} // Expiration Check bool hasExpired() const; bool hasExpiredWrt(Timer const& t) const; void set(long int seconds, long int useconds); void set(const Timer& t) { tv_sec = t.tv_sec; tv_usec = t.tv_usec; } }; #endif