19 #ifndef TCTIMESTAMP_CPP
20 #define TCTIMESTAMP_CPP
22 #include "TCTimestamp.hpp"
39 return(timerisset(&this->
timestamp) != 0);
48 gettimeofday(&toc, NULL);
50 return double((toc.tv_sec - timestamp->tv_sec)*1000000 +
51 toc.tv_usec - timestamp->tv_usec)/1000;
60 sprintf(cache,
"%ld,%ld",
61 this->timestamp.tv_sec,
62 this->timestamp.tv_usec);
65 timestamp->assign(cache);
69 int status = sscanf(timestamp.c_str(),
"%ld,%ld",
70 &this->timestamp.tv_sec,
71 &this->timestamp.tv_usec);
76 this->timestamp.tv_sec = timestamp->tv_sec;
77 this->timestamp.tv_usec = timestamp->tv_usec;