clock_t clock()
| 得到从进程启动到此次函数调用时累计的时钟滴答 数 |
time_t time(time_t *t)
| 从1970-01-01 00:00:00 ,到此次函数调用时,所经过的秒 数 |
struct tm * gmtime(const time_t *timep)
| 获得以GMT 时间 |
struct tm * localtime(const time_t *timep)
| 获得以当地 时间 |
time_t mktime(struct tm *tmp)
| 将struct tm 表示的时间转换为time_t 表示的时间 |
char* ctime(const time_t *timep)
| 得到格式化的时间,格式为星期 月 日 小时:分:秒 年 |
char* asctime(struct tm *tmp)
| 得到格式化的时间,格式为星期 月 日 小时:分:秒 年 |
size_t strftime(char *buff,
size_t maxSize,
const char *format,
const struct tm *tmp)
| 将tmp 按照format 格式化后,放到buff 中 |
double difftime(time_t time1,
time_t time0)
| 比较time0 比time1 相差多少秒 |
void tzset()
| 根据TZ 环境变量设置时区 |
int nanosleep(
const struct timespec *req,
struct timespec *rem)
| 挂起当前线程指定的时间 |