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