time.h (1) 썸네일형 리스트형 시간 함수 time 함수를 이용해서 현재 시간을 반환할 수 있습니다. #include #include //이 헤더가 포함되야 합니다. int main() { time_t now = time(nullptr);//time(&now);도 가능합니다. 인수와 반환이 제공하는 값이 똑같습니다. __time32_t now32 = _time32(nullptr);//time의 32비트 버전 __time64_t now64 = _time64(nullptr);//time의 64비트 버전 clock_t cl = clock(); printf("프로그램 시작 후 경과 시간(초) : %f\n", (double)cl / CLOCKS_PER_SEC); time_t now2 = time(nullptr); __time32_t now2_32 = _t.. 이전 1 다음