定时器的小问题

xiangye 2004-08-31 10:10:33
struct itimerval t;
v.it_interval.tv_sec与v.it_value.tv_sec有什么区别
刚看内核,有问题就靠各位了
...全文
80 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
xiangye 2004-09-01
3ku
回复
xiangye 2004-09-01
3ku
回复
xiangye 2004-09-01
3ku
回复
gettext 2004-09-01
man setitimer

Timer values are defined by the following structures:
struct itimerval {
struct timeval it_interval; /* next value */
struct timeval it_value; /* current value */
};
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};

Getitimer(2) fills the structure indicated by value with the current setting for
the timer indicated by which (one of ITIMER_REAL, ITIMER_VIRTUAL, or ITIMER_PROF).
The element it_value is set to the amount of time remaining on the timer, or zero
if the timer is disabled. Similarly, it_interval is set to the reset value.
Setitimer(2) sets the indicated timer to the value in value. If ovalue is nonzero,
the old value of the timer is stored there.
回复
相关推荐
发帖
Linux_Kernel
创建于2007-08-27

4156

社区成员

Linux/Unix社区 内核源代码研究区
申请成为版主
帖子事件
创建了帖子
2004-08-31 10:10
社区公告
暂无公告