time.h

来自「linux内核0.1版的源代码.只有几百K,学习系统原理的经典程序.」· C头文件 代码 · 共 43 行

H
43
字号
#ifndef _TIME_H#define _TIME_H#ifndef _TIME_T#define _TIME_Ttypedef long time_t;#endif#ifndef _SIZE_T#define _SIZE_Ttypedef unsigned int size_t;#endif#define CLOCKS_PER_SEC 100typedef long clock_t;struct tm {	int tm_sec;	int tm_min;	int tm_hour;	int tm_mday;	int tm_mon;	int tm_year;	int tm_wday;	int tm_yday;	int tm_isdst;};clock_t clock(void);time_t time(time_t * tp);double difftime(time_t time2, time_t time1);time_t mktime(struct tm * tp);char * asctime(const struct tm * tp);char * ctime(const time_t * tp);struct tm * gmtime(const time_t *tp);struct tm *localtime(const time_t * tp);size_t strftime(char * s, size_t smax, const char * fmt, const struct tm * tp);void tzset(void);#endif

⌨️ 快捷键说明

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