Linux 内核时间结构
来源:互联网 发布:ip与mac地址扫描工具 编辑:程序博客网 时间:2024/05/22 15:43
为了自包含而包含此结构, 内核中使用较少:
struct tm { /* * the number of seconds after the minute, normally in the range * 0 to 59, but can be up to 60 to allow for leap seconds */ int tm_sec; /* the number of minutes after the hour, in the range 0 to 59*/ int tm_min; /* the number of hours past midnight, in the range 0 to 23 */ int tm_hour; /* the day of the month, in the range 1 to 31 */ int tm_mday; /* the number of months since January, in the range 0 to 11 */ int tm_mon; /* the number of years since 1900 */ long tm_year; /* the number of days since Sunday, in the range 0 to 6 */ int tm_wday; /* the number of days since January 1, in the range 0 to 365 */ int tm_yday;};
内核常用的时间数据结构:
struct timespec { __kernel_time_t tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */};struct timeval { __kernel_time_t tv_sec; /* seconds */ __kernel_suseconds_t tv_usec; /* microseconds */};struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */};/* * ktime_t: * * A single 64-bit variable is used to store the hrtimers * internal representation of time values in scalar nanoseconds. The * design plays out best on 64-bit CPUs, where most conversions are * NOPs and most arithmetic ktime_t operations are plain arithmetic * operations. * */union ktime { s64 tv64;};typedef union ktime ktime_t;
内核中常用的时间的函数API:
这里写代码片
阅读全文
0 0
- Linux 内核时间结构
- Linux内核结构详解
- linux 内核源码结构
- Linux内核结构详解
- Linux内核结构详解
- Linux内核源代码结构
- Linux内核目录结构
- linux 内核结构
- linux网络内核结构
- linux内核目录结构
- linux内核源码结构
- linux内核结构
- Linux内核结构
- linux内核结构
- linux内核 address_space 结构
- linux内核源码结构
- linux内核结构详解
- linux内核结构
- 写给所有程序员_寻求更优解_你值得更好的
- Java调用Oracle分页存储过程
- crate数据库启动问题{可通用}
- Android Studio导入其他项目
- 构建一个简单的服务器环境Ubuntu 16.04.3 x64
- Linux 内核时间结构
- 软件测试流程
- rot47 中文 转 ASCII
- Linux之我最常用的命令
- Java反射机制-简单案例实现(代码篇)
- Java IO流-IO 流简介
- mysql表创建好后添加外键
- Hadoop分布式文件系统:HDFS架构和设计(3)
- Swing——MouseListener监听器(画直线)