00001 #ifndef ots_TimeFormatter_h
00002 #define ots_TimeFormatter_h
00003
00004 #include <sys/time.h>
00005 #include <string>
00006
00007 namespace ots
00008 {
00009 class TimeFormatter
00010 {
00011 public:
00012 TimeFormatter(std::string source);
00013 ~TimeFormatter(void);
00014
00015
00016 static std::string getTime(void);
00017 static std::string getmSecTime(void);
00018
00019 void stopTimer(void);
00020 struct tm* getITime(void);
00021 struct timeval getImSecTime(void);
00022
00023 private:
00024 struct timeval startTime_;
00025 struct timeval endTime_;
00026 std::string origin_;
00027 bool verbose_;
00028 };
00029
00030 }
00031 #endif