缓慢的阅读着,进度和蜗牛一样。《UNIX环境高级编程》总算结束了第六章,下一章开始进入 process 的内容,激动ing。
第六章最后讨论了时间函数的使用,Steven 老大总是能将繁复的函数们之间的关系,用明了的图示勾勒出来,下面是时间函数们(time(), ctime() ...)之间的关系:

看着图就不需要再解释里面的使用了,哈哈。。下面是 struct tm 的定义:
struct tm { /* a broken-down time */
int tm_sec; /* seconds after the minute: [0 - 60] */
int tm_min; /* minutes after the hour: [0 - 59] */
int tm_hour; /* hours after midnight: [0 - 23] */
int tm_mday; /* day of the month: [1 - 31] */
int tm_mon; /* months since January: [0 - 11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday: [0 - 6] */
int tm_yday; /* days since January 1: [0 - 365] */
int tm_isdst; /* daylight saving time flag: <0, 0, >0 */
};
嗯,咔咔~
评论