摘要: 1.获取当前时间 a. 获取系统当前的秒数和毫秒数 struct timeval tv; gettimeofday(&tv, NULL); b. 获取系统当前时间的秒数 time_t now = time(NULL) 2. 获取日历时间 a. gmtime函数返回一个struct tm time_t 阅读全文
posted @ 2021-04-07 16:14 风影旋新月 阅读(1003) 评论(0) 推荐(0) 编辑