00001
00002 #ifndef _TIMER_H_
00003 #define _TIMER_H_
00004
00005 #include <sys/time.h>
00006 #include <unistd.h>
00007
00011 class Timer
00012 {
00013 private:
00014 int running;
00015 int seconds;
00016 int microseconds;
00017 timeval start;
00018 timeval stop;
00019
00020 public:
00021 Timer::Timer() {
00022 running = 0;
00023 seconds = 0;
00024 microseconds = 0;
00025 }
00026
00029 void Start();
00032 void Stop();
00035 float getTime();
00039 void Print();
00043 void Tick();
00044 };
00045
00046 void MemoryStatistics();
00047
00050 #endif