- 论坛徽章:
- 0
|
我想实现 在某一个时间间隔后 循环执行某一个动作
我尝试用
struct timeval time;
memset(&time, 0, sizeof(timeval));
time.tc_sec = 1;
time.tv_usec = 0;
select(NULL, NULL, NULL, NULL, &time);
但是系统提示
/usr/include/linux/time.h:9: redefinition of `struct timespec'
/usr/include/linux/time.h:19: syntax error before "suseconds_t"
/usr/include/linux/time.h:43: redefinition of `struct itimerspec'
/usr/include/linux/time.h:49: field `it_interval' has incomplete type
/usr/include/linux/time.h:50: field `it_value' has incomplete type
不知道大家还有什么其他的实现方法?
[ 本帖最后由 karl412 于 2007-5-9 14:56 编辑 ] |
|