// 线程0执行以下代码: time_t curtime = time(NULL); struct tm* cdt = localtime(&curtime); char strtime[25] = ""; sprintf(strtime, "%02d:%02d:%02d", cdt->tm_hour, cdt->tm_min, cdt->sec); printf("thread [0] time is %s\n", strtime); // 线程1执行以下代码: time_t curtime = time(NULL); struct tm* cdt = gmtime(&curtime); char strtime[25] = ""; sprintf(strtime, "%02d:%02d:%02d", cdt->tm_hour, cdt->tm_min, cdt->sec);