00001 00013 #pragma once 00014 00015 #include <sys/time.h> 00016 #include <time.h> 00017 #include <unistd.h> 00018 00019 #include <iostream> 00020 using namespace std; 00021 00022 class KjTimer 00023 { 00024 timeval m_tStart; 00025 timeval m_tStop; 00026 struct timezone m_tZone; 00027 00028 void StartTimer(); 00029 void StopTimer(); 00030 public: 00031 KjTimer(); 00032 ~KjTimer(); 00033 00034 void Wait(const int _iMilisecond); 00035 00036 };