-
- time_t:时间戳
- clock_t:CPU运行时间
- timespec(msvc):纳秒
- timeb:毫秒
- timeval(Unix):微妙
-
- 传地址,改变原值
- 传NULL,接收新值
-
- Windows
- Unix
- Mac
-
- char* _Buffer:缓冲字符串,用来接收值
- size_t _SizeInBytes:每次读取多少字节
- char const* _Format:以什么格式输出,参考官方文档
- struct tm const* _Tm:tm格式的数据
-
-
C 库函数 int sscanf(const char *str, const char *format, ...) 从字符串读取格式化输入
-
把第一个参数的信息,通过第二个参数的格式,输入到之后参数里
-
int main() { int day, year; char weekday[20], month[20], dtm[100]; strcpy( dtm, "Saturday March 25 1989" ); sscanf( dtm, "%s %s %d %d", weekday, month, &day, &year ); printf("%s %d, %d = %s\n", month, day, year, weekday ); return(0); } //打印结果:March 25, 1989 = Saturday
-