ChinaUnix.net
相关文章推荐:

TimingWheel timer

unix下有没有timer这种东西。我想在程序中定时执行某函数。

by 流言飞语 - C/C++ - 2005-09-27 16:41:20 阅读(1797) 回复(5)

相关讨论

;************************************************************ ; Institute of Automation, Chinese Academy of Sciences ;File Name: Init.s ;Description: timer interrupt test. ;Author: JuGuang,Lee ;Date: ;************************************************************** IOPMOD EQU 0x3FF5000 ;I/O口模式寄存器 IOPDATA EQU 0x3FF5008 ;I/O口数据寄存器 TMOD EQU 0x3FF6000 ;定时器模式寄存器 TDATA0 EQU 0x3FF6...

by zls0315 - Linux文档专区 - 2008-04-28 16:35:10 阅读(605) 回复(0)

Hi! 最近发现dns服务器的messages里面出现了很多的POKED timer的告警,是named发出的,那位DX能帮助解释一下其中的原因,是否会有什么影响? 我的系统是solaris9+bind9.3.2, 谢谢!

by ree - 服务器应用 - 2006-08-23 13:51:10 阅读(2432) 回复(0)

各位大侠,在UNIX下有没有类似于WINDOWS(VC)下的timer事件的功能函数,或者说回调吗?怎么做! 谢谢!

by liuqingzhu - C/C++ - 2003-08-28 02:56:11 阅读(1687) 回复(7)

timertimerTask 使用timertimerTask可以将一个动作延迟一段时间执行,或者周期性的执行某项任务。延迟动作可以很方便的用Handler实现,没必要用timer。使用timertimerTask周期性的执行某项任务还是非常方便的,它们也是Java本身的特性,可参考文档 http://docs.oracle.com/javase/1.5.0/docs/api/java/util/timer.html (这个要比Google的文档详细很多,包括schedule与scheduleAtFixedRate的区别,cancel与purg...

android

by 中关村村草 - 移动操作系统 - 2011-11-27 14:43:05 阅读(1922) 回复(0)

[code]#include #include #include #include timer.h> void timer_fun(unsigned long data) { } static int __init hello_init(void) { struct timer_list timer; init_timer(&timer); timer.data=0; timer.expires=jiffies+1*HZ; timer.function=timer_fun; add_timer(&timer); printk("timer is running now !!\n"); return 0; } static void __ex...

by heyangya - 驱动开发 - 2011-04-12 08:58:53 阅读(1912) 回复(3)

#include <stdio.h>    // for printf()
#include <unistd.h>   // for pause()
#include <signal.h>   // for signal()
#include <string.h>   // for memset()
#include <sys/time.h> // struct itimeral. setitimer()
#include <pthread.h>
void printMsg(int);
int main() {
  // Get system call result to...

by lingyunwmr - 移动操作系统 - 2011-02-15 22:05:02 阅读(431) 回复(0)

这里想说的是 TCP keepalive time 和 syn ack timer。 我的版本是 2.6.24的内核,keepalive timer 的定义如下:[code]static void tcp_keepalive_timer (unsigned long data) { struct sock *sk = (struct sock *) data; struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); __u32 elapsed; /* Only process if socket is not in use. */ bh_lock_sock(sk); if (sock_owned_by_user(sk)...

by Godbach - 内核源码 - 2010-08-24 16:22:16 阅读(2249) 回复(4)

我使用hrtime来完成定时操作,但是发现在系统休眠,freeze task以后,hrtime就不能被调用,我估计是管理timer的进程被休眠了。 我现在需要在系统休眠的时候,hrtime也能正常工作,不知道专家们有没有什么好的办法? 谢谢了

by jarslan - 驱动开发 - 2010-03-31 16:53:04 阅读(1348) 回复(3)

请问前辈人有没有实践过”input capture, output compare(ICOC)”, 我想它的意思是不是一个timer module,我们可以透过设硬件的timer IC,让输入的时候可以累加,在输出的时候可以跟我们当时在硬件设置的值做比较,如果一样,就发出一个interrupt,举例来说,假设我们设定timer IC记数为12,在输入一次就累加1,每一次的输出都会跟IC的计数做比较,一旦到了12,就发出一个interrupt,这是不是就是所谓的ICOC呢?(解释错误的话请指正喔) 有没有...

by ckjboy2003 - 嵌入式开发 - 2009-06-19 01:05:19 阅读(946) 回复(1)

1. high efficiency algorithm 2. divide the timers based on their expirations 3. always handling the timers in the first L2 queue 4. when one of the L2 queue is empty, move the coming timers from it’s next one 5. algorithm analysis: add and delete 1 timer: O(1), search 1 timer: O(avg(L2queue’s length)) 本文来自ChinaUnix博客,如果查看原文请点:http://b...

by bobcuer - Linux文档专区 - 2009-04-19 17:23:06 阅读(1149) 回复(0)