CodeSarang.Com
Home | All categories Join | Login | 검색   

 

sec 를 이용하여 시/분/초 구하기

등록자 : cpueblo (유광희), 2008-09-02
글수정 | 글삭제


void PrintUseDateSpace(time_t seconds)
{
    time_t hours,minutes;

    minutes = seconds / 60;
    hours = minutes / 60;

    if (hours > 0)      Printf("%4d시간 ", hours);
    else Printf("         ");
    if (minutes > 0)    Printf("%2d분 ", minutes % 60);
    else Printf("     ");
    if (seconds % 60)   Printf("%2d초", seconds % 60);
    else Printf("     ");
}




글수정 | 글삭제
http://codesarang.com. mail to cpueblocpueblo.com