调用系统时间
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"); }