#include #include #include #include int main() { // const char * str = "7c114eeb9859dfaf5391dc066e14bf47"; // //strcpy(str,"7c114eeb9859dfaf5391dc066e14bf47"); // std::string str2 = "7c114eeb9859dfaf5391dc066e14bf47"; // printf("str1: %s, str2: %s, strcmp: %d\n", str, str2.c_str(), strcmp(str, str2.c_str())); struct timeval tv; gettimeofday(&tv, NULL); printf("struct len: %d, len 1/2: %d, len of tv_sec: %d, len of tv_usec: %d\n", sizeof(tv), sizeof(tv)/2, sizeof(tv.tv_sec), sizeof(tv.tv_usec)); printf("usec: %d\t sec: %d\n", tv.tv_usec, tv.tv_sec); return 0; }