#c 시간 함수1 [C] 날짜/시간 처리 함수 출처 : http://forum.falinux.com/ 헤더 필요 (#include ) 1. 현재시간 구하기 형태 time_t time(time_t *t)인수 time_t *t 시간정보를 받을 변수반환 time_t 1970년 1월 1일 0시부터 함수를 호출할 때 까지의 초 카운트#include #include int main() { time_t current_time; time(¤t_time); printf("%ldn", current_time); printf(ctime( ¤t_time)); return 0; } 2. 초단위 시간을 읽기 편한 문자열로 변환하기 형태 char ctime(const time_t *t)인수 time_t *t 1970년 1월 1일 0시부터 함수를 호출할 때.. 2016. 7. 7. 이전 1 다음