时间函数及使用:
#define _CRT_SECURE_NO_WARNINGS
#include<stdlib.h>
#include<stdio.h>
#include<time.h>
void main()
{
time_t now;
struct tm *local; //时间结构体
now = time(NULL); //取得当前时间
printf("%d 秒。\n", now);
printf("当前时间:%s\n", ctime(&now));
local = localtime(&now);
printf("本地时间:%s\n", asctime(local));
system("pause");
}