获取当前时间
  • 板块灌水区
  • 楼主juchenglin
  • 当前回复4
  • 已保存回复4
  • 发布时间2023/4/1 15:35
  • 上次更新2023/10/23 19:47:26
查看原帖
获取当前时间
580868
juchenglin楼主2023/4/1 15:35
#include <stdio.h> 
#include <time.h> 
int main ()
{ 
	while(true)
	{
		time_t rawtime;
		struct tm * timeinfo;
		time ( &rawtime );
		timeinfo = localtime ( &rawtime );
		printf("The current date/time is: %s", asctime (timeinfo));
	}
}
2023/4/1 15:35
加载中...