time2str.c

来自「一款类linux的操作系统源码」· C语言 代码 · 共 18 行

C
18
字号
#include <stdlib.h>#include <string.h>#include <sys/time.h>voidtime2str(const time_t clock, char *s){    struct tm tm;    if (s == NULL)	return;    bzero(&tm, sizeof(struct tm));   //将 tm 当中的值清为0    time2tm(clock, &tm);    tm2str(&tm, s);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?