内核中一般使用:

声明:

struct timer_list trelease_timer=TIMER_INITIALIZER(function,0,0);

启动定时器:

mod_timer(&trelease_timer,jiffies+(HZ/100)*N);

超时任务:

 void function(){}

 

 

使用HZ能保证跨平台的延时相同

 

相关文章:

  • 2021-05-06
  • 2021-11-13
  • 2022-12-23
  • 2021-08-09
  • 2021-06-26
  • 2021-11-30
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2021-10-13
  • 2021-07-01
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案