#include <stdio.h>
#include <time.h>

long GetTickCount()
{
   time_t timer;
   struct tm *t_st;

   /* get current time */
   time(&timer);

   t_st = localtime(&timer);

   return ((t_st->tm_year  * 10000000000) +
           (t_st->tm_mon+1 * 100000000) +
           (t_st->tm_mday  * 1000000) +
           (t_st->tm_hour  * 10000) +
           (t_st->tm_min   * 100) +
           t_st->tm_sec);
}

int main(void)
{
   time_t timer;
   struct tm *t_st;
   char *wday[] = {"日","月","火","水","木","金","土"};

   /* 現在時刻の取得 */
   time(&timer);

   /* 現在時刻を構造体に変換 */
   t_st = localtime(&timer);
   printf("年  : %d ",t_st->tm_year+1900);
   printf("月  : %d ",t_st->tm_mon+1);
   printf("日  : %d ",t_st->tm_mday);
   printf("曜日: %s ",wday[t_st->tm_wday]);
   printf("時  : %d ",t_st->tm_hour);
   printf("分  : %d ",t_st->tm_min);
   printf("秒  : %d ",t_st->tm_sec);

   return 0;
}


facebook posting twit

  • SoBig.Worm Virus 퇴치 방법
  • IE 쿠키 세팅하는 방법
  • cgi File Downloading Module
  • AES (Advanced Encryption Standard) Source Code
  • Simple Socket Server based on C
  • how to lock workstation? seems like shutdown
  • Virtusertable
  • 웹서버 및 웹메일 설정 방법
  • 음력-양력 변환기
  • PHP에서 메일 함수가 동작하지 않을때
  • Leave a Reply