00001
00002 #ifndef INCLUDE_NAVLIB_TIMER
00003 #define INCLUDE_NAVLIB_TIMER
00004
00005 #ifdef WIN32
00006 #include <windows.h>
00007 #elif LINUX
00008 #include <sys/time.h>
00009 #endif
00010
00011 namespace navlib
00012 {
00013
00014 unsigned int randomSeed();
00015
00017 class Timer
00018 {
00019 public:
00020 Timer();
00021 void tic();
00022 double toc();
00023
00024 private:
00025 #ifdef WIN32
00026 LARGE_INTEGER _ticksPerSecond;
00027 LARGE_INTEGER _tick;
00028 #elif LINUX
00029 timeval _tick;
00030 #endif
00031 };
00032
00033 }
00034
00035 #endif
00036