调用系统时间

VS中编译通过:

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
    printf("This is a test!\n");
    time_t rawtime;
    rawtime = time(NULL);
    struct tm *systime = localtime(&rawtime);
    printf("Time is: %s", asctime(systime));
    system("pause");
}
posted @ 2017-05-19 23:24  StephenJusky  阅读(205)  评论(0编辑  收藏  举报