10 2013 档案

摘要:1、Linux下常用时间类型 Linux下常用时间类型有四种:time_t、struct tm、struct timeval、struct timespec1.1 time_t时间类型 time_t类型在time.h中定义:#ifndef __TIME_T #define __TIME_T typedef long time_t; #endif可见,time_t实际是一个长整型。其值表示为从UTC(coordinated universal time)时间1970年1月1日00时00分00秒(也称为Linux系统的Epoch时间)到当前时刻的秒数。由于time_t类型长度的限制,它所表示的时间 阅读全文
posted @ 2013-10-24 15:26 HelloMarvin 阅读(416) 评论(0) 推荐(0)