duncan
Mom and Dad were wrong!
|
00001 #ifndef TIMER_TIMER_H_ 00002 #define TIMER_TIMER_H_ 00003 00004 #include <sys/time.h> 00005 00006 namespace timer { 00007 00015 class Timer { 00016 private: 00017 unsigned int microseconds_; 00018 timeval last_time_[2]; 00019 00020 void get_time(unsigned char); 00021 public: 00022 Timer(unsigned int micros=1000); 00023 00024 unsigned int elapsed(); 00025 void reset(); 00026 }; 00027 00028 } 00029 00030 #endif