Linux定时器的实现

linux下多定时器的实现(经典) 分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow                linux下多定时器的实现一、 阅读详情

Linux定时器的实现

 

 

#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <stdlib.h>
#include <signal.h>
int count = 0;
void set_timer()
{
        struct itimerval itv, oldtv;
        itv.it_interval.tv_sec = 0;
        itv.it_interval.tv_usec = 1000;
        itv.it_value.tv_sec = 0;
        itv.it_value.tv_usec = 1000;
        setitimer(ITIMER_REAL, &itv, &oldtv);
}
void sigalrm_handler(int sig)
{
        count++;
}
int main( )
{
        signal(SIGALRM, sigalrm_handler);
        set_timer();
        while(count < 10000){
        }
        printf("count  = %d/n", count);
        exit(0);
}
setitimer函数的精度决定于系统时钟的分辨率,在我的系统中要40s才能返回,说明分辨率不到1ms。如果改成间隔10ms(10000us)的话,系统100s返回,很准确。一般操作系统的分辨率都为10ms。注意,信号会中断低速系统调用,所以这里用循环延迟,而不是用sleep之类的函数。

还有一种方法是基于RTC,可以提供更高的分辨率。
#include <stdio.h>
#include <linux/rtc.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
int main(void)
{
    int i, fd, retval, irqcount = 0;
    unsigned long tmp, data;
    fd = open ("/dev/rtc", O_RDONLY);
    if (fd ==  -1) {
      perror("/dev/rtc");
      exit(errno);
    }
    fprintf(stderr, "/n/tRTC Driver Test Example./n");
    /* Turn on update interrupts (one per second) */
    retval = ioctl(fd, RTC_UIE_ON, 0);
    if (retval == -1) {
      perror("ioctl");
      exit(errno);
    } 
    fprintf(stderr, "Counting 5 update (1/sec) interrupts from reading /dev/rtc:");
    fflush(stderr);
    for (i=1; i<6; i++) {
        /* This read will block */
        retval = read(fd, &data, sizeof(unsigned long));
        if (retval == -1) { 
           perror("read");
           exit(errno);
        }
        fprintf(stderr, " %d",i);
        fflush(stderr);
        irqcount++;
    }
    /* Turn off update interrupts */
    retval = ioctl(fd, RTC_UIE_OFF, 0);
    if (retval == -1) {
      perror("ioctl");
      exit(errno);
    }
    /* Read periodic IRQ rate */
    retval = ioctl(fd, RTC_IRQP_READ, &tmp); 
    if (retval == -1) { 
      perror("ioctl"); 
      exit(errno);
    }
    fprintf(stderr, "/nPeriodic IRQ rate was %ldHz./n", tmp);
    fprintf(stderr, "Counting 20 interrupts at:");
    fflush(stderr);
    /* The frequencies 128Hz, 256Hz, ... 8192Hz are only allowed for root. */
    for (tmp=2; tmp<=64; tmp*=2) {
      retval = ioctl(fd, RTC_IRQP_SET, tmp);
      if (retval == -1) {
          perror("ioctl");
          exit(errno);
      }
      fprintf(stderr, "/n%ldHz:/t", tmp);
      fflush(stderr);
      /* Enable periodic interrupts */
      retval = ioctl(fd, RTC_PIE_ON, 0);
      if (retval == -1) {
         perror("ioctl");
         exit(errno);
      }
      for (i=1; i<21; i++) {
       /* This blocks */ 
       retval = read(fd, &data, sizeof(unsigned long));
       if (retval == -1) {
           perror("read");
           exit(errno);
       } 
       fprintf(stderr, " %d",i);
       fflush(stderr);
       irqcount++;
       }
       /* Disable periodic interrupts */
       retval = ioctl(fd, RTC_PIE_OFF, 0);
       if (retval == -1) {
           perror("ioctl");
           exit(errno); 
       } 
    }
    fprintf(stderr, "/n/t *** Test complete ***/n");
    fprintf(stderr, "/nTyping /"cat /proc/interrupts/" will show %d more events on IRQ 8./n", irqcount);
    close(fd);
    return 0;
}
返回值是unsigned long型变量,低字节表示中断的类型(update-done, alarm-rang, or periodic),其他字节表示从上次读以来产生的中断次数。注意在高频率或高负载的情况下,会出现interrupt pileup,即中断次数大于一次,所以当大于时钟中断频率(1000HZ)时应检查返回值。
这两种定时器的实现都无法在一个进程里面同时设置多个定时器,需要自己实现一个timer管理器。    

 

#include <stdio.h>
#include <stdlib.h>
#include <time.h>  
#include <sys/time.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/stat.h>
#include <signal.h>
#include <errno.h>

#define TRUE 1
#define FALSE 0
#define MUTEX 0

#define MAX_TIMERS 20 /* number of timers */
#define VERY_LONG_TIME {0x7FFFFFFF, 0} /* longest time possible */
typedef struct timeval TIME;  /* how time is actually stored */

struct timer {
int inuse;  /* TRUE if in use */
TIME time;  /* relative time to wait */
void (*callback)(void *);  /* callback function */
void *param; /* callback parameter */
} timers[MAX_TIMERS];  /* set of timers */
struct timer *timer_next = NULL;/* timer we expect to run down next */
TIME time_timer_set;  /* time when physical timer was set */
int semid;       /* semaphore set */
sigset_t newmask, oldmask; /* signal mask */

void timers_update();
void set_timer(TIME time);

int sem_init(int nsems,int flag)
{
int semid;
semid = semget(IPC_PRIVATE, nsems, flag);
if (semid == -1)
  perror("semget");
return semid;
}
int sem_setval(int semid, int semnum, int val)
{
if (val < 0)
  return -1;
semctl(semid, semnum, SETVAL, val);
return 0;
}
int sem_wait(int semid, int semnum)
{
struct sembuf sem;
int ret;
sem.sem_num = semnum;
sem.sem_op = -1;
sem.sem_flg = SEM_UNDO;
while(((ret=semop(semid, &sem, 1)) == -1) && (errno == EINTR));
if (ret == -1){
  perror("sem_wait");
  return -1;
}
else
  return 0;
}
int sem_signal(int semid, int semnum)
{
struct sembuf sem;
int ret;
sem.sem_num = semnum;
sem.sem_op = 1;
sem.sem_flg = SEM_UNDO;
while(((ret=semop(semid, &sem, 1)) == -1) && (errno == EINTR));
if (ret == -1){
  perror("sem_signal");
  return -1;
}
else
  return 0;
}
void sem_delete(int semid, int semnum)
{
semctl(semid, semnum, IPC_RMID);
}
int disable_interrupt()
{
if (sigprocmask(SIG_BLOCK, &newmask, &oldmask) < 0) {
  perror("SIG_BLOCK");
  return -1;
} else {
  return 0;
}
}
int enable_interrupt()
{
if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) {
  perror("SIG_SETMASK");
  return -1;
} else {
  return 0;
}
}
int time_now(TIME *time_val)
{
struct timezone tz;
int ret;
ret = gettimeofday(time_val, &tz);
return ret;
}
int time_after(TIME t1, TIME t2)
{
if ((t1.tv_sec - t2.tv_sec) > 0)
  return 1;
else if ((t1.tv_sec - t2.tv_sec) < 0)
  return -1;
else {
  if ((t1.tv_usec - t2.tv_usec) > 0)
   return 1;
  else if ((t1.tv_usec - t2.tv_usec) < 0)
   return -1;
  else
   return 0;
}
}
TIME subtract(TIME t1, TIME t2)
{
TIME tmp;
if ((t1.tv_usec - t2.tv_usec) < 0) {
  t1.tv_sec--;
  t1.tv_usec += 1000000;
  tmp.tv_sec = t1.tv_sec - t2.tv_sec;
  tmp.tv_usec = t1.tv_usec - t2.tv_usec;
} else {
  tmp.tv_sec = t1.tv_sec - t2.tv_sec;
  tmp.tv_usec = t1.tv_usec - t2.tv_usec;
}
return tmp;
}
TIME add(TIME t1, TIME t2)
{
TIME tmp;
if ((t1.tv_usec + t2.tv_usec) < 1000000) {
  tmp.tv_sec = t1.tv_sec + t2.tv_sec;
  tmp.tv_usec = t1.tv_usec + t2.tv_usec;
} else {
  tmp.tv_sec = t1.tv_sec + t2.tv_sec + 1;
  tmp.tv_usec = t1.tv_usec + t2.tv_usec - 1000000;
}
return tmp;
}
void timer_init(void)
{
struct timer *t;
for (t=timers;t<&timers[MAX_TIMERS];t++)
  t->inuse = FALSE;
}
void timer_unregister(struct timer *t)
{
TIME tn;
sem_wait(semid, MUTEX);
disable_interrupt();

if (!t->inuse) {
  enable_interrupt();
  sem_signal(semid, MUTEX);
  return;
}
t->inuse = FALSE;
/* check if we were waiting on this one */
if (t == timer_next) {
  if (time_now(&tn) < 0) {
   perror("time_now");
   enable_interrupt();
   sem_signal(semid, MUTEX);
   return;
  }
  timers_update(subtract(tn, time_timer_set));
  if (timer_next) {
   set_timer(timer_next->time);
   time_timer_set = tn;
  }
}
enable_interrupt();
sem_signal(semid, MUTEX);
}
void timers_update(TIME time)
{
static struct timer timer_last = {
  FALSE   /* in use */,
  VERY_LONG_TIME  /* time */,
  NULL   /* callback pointer */,
  NULL   /* callback param */
};
struct timer *t;
timer_next = &timer_last;
for (t=timers;t<&timers[MAX_TIMERS];t++) {
  if (t->inuse) {
   if (time_after(t->time, time) > 0) { /* unexpired */
    t->time = subtract(t->time, time);
    if (time_after(timer_next->time, t->time) > 0)
     timer_next = t;
   } else { /* expired */
    t->callback(t->param);
    t->inuse = FALSE; /* remove timer */
   }
  }
}
/* reset timer_next if no timers found */
if (!timer_next->inuse)
  timer_next = NULL;
}
struct timer *timer_register(TIME time, void (*callback)(void *), void *param)
{
struct timer *t;
TIME tn;
sem_wait(semid, MUTEX);
disable_interrupt();
for (t=timers;t<&timers[MAX_TIMERS];t++) {
  if (!t->inuse)
   break;
}
/* out of timers? */
if (t == &timers[MAX_TIMERS]) {
  enable_interrupt();
  sem_signal(semid, MUTEX);
  return NULL;
}
/* install new timer */
t->time = time;
t->callback = callback;
t->param = param;
if (time_now(&tn) < 0) {
  perror("time_now");
  enable_interrupt();
  sem_signal(semid, MUTEX);
  return NULL;
}
if (!timer_next) {
  /* no timers set at all, so this is shortest */
  time_timer_set = tn;
  timer_next = t;
  set_timer(timer_next->time);
} else {
  TIME new_time, last_time;
  new_time = add(time, tn);
  last_time = add(timer_next->time, time_timer_set);
  if (time_after(last_time, new_time) > 0){
   /* new timer is shorter than current one */
   timers_update(subtract(tn, time_timer_set));
   time_timer_set = tn;
   timer_next = t;
   set_timer(timer_next ->time);
  } else {
   /* new timer is longer than current one */
  }
}
t->inuse = TRUE;
enable_interrupt();
sem_signal(semid, MUTEX);
return t;
}

void set_timer(TIME time)
{
struct itimerval itv, oldtv;
itv.it_interval.tv_sec = 0;
itv.it_interval.tv_usec = 0;
itv.it_value.tv_sec = time.tv_sec;
itv.it_value.tv_usec = time.tv_usec;
setitimer(ITIMER_REAL, &itv, &oldtv);
}

void timer_interrupt_handler(int sig)
{
TIME tn;

printf("interrupt--------/n");
if (time_now(&tn) < 0) {
  perror("time_now");
  return;
}
timers_update(subtract(tn, time_timer_set));
/* start physical timer for next shortest time if one exists */
if (timer_next) {
  time_timer_set = tn;
  set_timer(timer_next ->time);
}
}
void timer_callback(void * param)
{
printf("%s callback/n", param);
}
int main( )
{
TIME time1 = {3,0},time2 = {5,0};
struct timer *p;

signal(SIGALRM, timer_interrupt_handler);
sigemptyset(&newmask);
sigaddset(&newmask, SIGALRM);

semid = sem_init(1, S_IRUSR|S_IWUSR);
if (semid == -1)
  exit(-1);
sem_setval(semid, MUTEX, 1);/*protect critical region*/

timer_init( );
timer_register(time1, timer_callback, "timer1");
p = timer_register(time1, timer_callback, "timer2");
timer_unregister(p);
timer_register(time2, timer_callback, "timer3");
getchar();
sem_delete(semid, MUTEX);

exit(0);
}

参考文献:
Title: Implementing Software Timers
By: Don Libes

Originally appeared in the Nov. 1990 "C User"s Journal" and is also
reprinted as Chapter 35 of "Obfuscated C and Other Mysteries",
John Wiley & Sons, 1993, ISBN 0-471-57805-3.
http://www.wiley.com/compbooks/m3.html.  

Linux下多定时器的实现 原文见:http://blog.chinaunix.net/u3/94771/showart_2000555.htmllinux下多定时器的实现一、已有的定时器接口   时空管理是计算机系统的主要任务。在时间管理中,我们经常利用定时器处理事情:比如tcp协议中利用定时器管理包超时,视频显示中利用定时器来定时显示视频帧,web服务中利用定时器来管理用户的超时。windows系统提供了Se 阅读详情

相关推荐

STM32G070xx将Flash页分块方式存储,固定数据块存储,实现一次擦除多次写入

本例程使用STM32G070xx芯片,Flash大小128KB,Flash每页(2048字节)写满后再擦除。操作存储区分为64块,每块32字节,即写满64次擦除一次;标定存储区分为16块,每块128字节,即写满16次擦除一次,每个存储区的块都有各自的头部标记

RaphaelCeo的博客 1550

linux下的C语言开发(定时器)

定时器是我们需要经常处理的一种资源。那linux下面的定时器又是怎么一回事呢?其实,在linux里面有一种进程中信息传递的方法,那就是信号。这里的定时器就相当于系统每隔一段时间给进程发一个定时信号,我们所要做的就是定义一个信号处理函数。 [cpp] view plaincopy #include    #include    #include

nmgzhangds的专栏 410

DIY电子管耳放实战:12AU7+6V6GT组合的电路设计与调试心得

本文详细分享了DIY电子管耳放的实战经验,重点解析了12AU7与6V6GT经典组合的电路设计、元件选型与调试过程。内容涵盖从核心架构设计、关键元件(如输出变压器、耦合电容)的科学选型,到静态工作点设置、负反馈引入及常见噪声问题的排查,旨在帮助音响DIY爱好者和电子管放大器初学者成功打造一台低失真、高信噪比且富有“胆味”的耳机放大器,享受动手制作的乐趣与温暖音质。

weixin_29230805的博客 568

Linux定时器的使用

Linux定时器的使用

m0_53255684的博客 856

28-基于STM32单片机的便携式健康监测系统设计与实现(程序+原理图+元件清单)

本文详细介绍了基于STM32单片机的便携式健康监测系统设计与实现,该系统集成MAX30102光电传感器和MSP20压力传感器,实时监测心率、血氧和血压等关键生理指标。通过STM32F103C8T6主控芯片和HC-05蓝牙模块,实现数据采集、处理及无线传输,具有便携性高、操作简便等特点,适用于家庭健康监护和户外运动场景。

weixin_29191669的博客 427

ADS2023实战:手把手教你用Load-Pull设计40W LDMOS功率放大器(附工程文件)

本文以飞思卡尔MRF8P9040N LDMOS晶体管为例,详细介绍了在ADS 2023中设计一款40W功率放大器(PA)的全流程。内容涵盖从直流偏置设置、稳定性分析、核心的负载牵引(Load-Pull)仿真,到基于Smith圆图的匹配网络设计、谐波平衡性能验证,直至版图生成与优化。文章提供了手把手的实战指导和工程文件,旨在帮助射频工程师掌握高效率PA的设计方法与关键技巧。

cake8的博客 1079

STM32 TIMER REGISTER

转载于:https://www.cnblogs.com/shangdawei/p/4803426.html

weixin_30342827的博客 270

使用geneHapR进行基因单倍型分析(以vcf文件为例)

如下图所示,可以看到,用户需要准备的包括:基因型文件、注释文件和样本信息文件,以及后续会用的表型文件。输出的主要内容有:变异位点的可视化、单倍型网络、地理分布、表型比较和连锁不平衡热图。geneHapR的工作流程。

沉香best的博客 5945

使用指针增强C语言程序模块化的几种常用方法

1.指针的增量 定义结构体A typedef struct { uint8_t valid; uint8_t threshold; uint8_t count; uint8_t state; }S_A; 定义由结构体A组成的结构体B typedef struct { uint8_t auchar; S_A a1; S_A a2; S_A a3; S_A a4; }S_B; 声明一个变量S_B b1; 如果要对b1的成员a1 a2 a3的valid成员赋值,采用如下方法变得简洁优美。 S_A *ptr = (

no1xizhong的博客 627

lammps案例:扭转

扭转有两种方式,一是固定一端旋转另外一端,二是两端沿相反的方向旋转。案例为两侧旋转方式,扭转后的效果如图所示。

lammps_jiayou的博客 1202

AI问数,智慧赋能:基于大语言模型的数据播报员应用实践探索

AI问数技术正在改变企业与数据交互的方式,它以自然语言为桥梁,让数据不再是少数专家的专利,而是成为所有业务人员的决策伙伴。这不仅是技术的创新,更是管理理念的革新。在数字化转型的关键阶段,企业应积极拥抱AI问数技术,通过降低数据使用门槛、提升数据利用效率、释放数据潜在价值,实现真正的数据驱动决策,为企业的高质量发展注入源源不断的智慧动能。AI问数,正在开启一个数据普惠的新时代。

getusushu的博客 65

Linux信号:signal函数、pause函数、alarm函数

Linux信号:signal函数、pause函数、alarm函数

qq_33300585的博客 2133

《MySQL 入门教程》第 03 篇 管理数据库

本篇主要介绍 MySQL 数据库的创建、查看、选择和删除操作,包括使用 mysql 命令行和 MySQL Workbench 图形工具两种方式。

Tony.Dong的专栏 3534

Linux下一种高效多定时器实现

Linux下一种高效多定时器实现 作者:LouisozZ 日期:2018.08.29 运行环境说明 由于在 Linux 系统下一个进程只能设置一个时钟定时器,所以当应用需要有多个定时器来共同管理程序运行时,就需要自行实现多定时器管理。 本文就是基于这种需求,在实际编码工作的基础上总结而出,希望跟大家共享,也欢迎大家讨论指正。 多定时器原理 在一个进程只能有一个定时器的前提条件下...

LouisozZ的专栏 1万+

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

Linux多定时器实现

一、setitimer函数 1. 头文件 #include <sys/time.h> 2. 函数原型 int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value); which参数说明: ITIMER_REAL:给一个指定的时间间隔,按照实际的时间来减少这个计数,当时间间隔为0的时候发出SIGALRM信号; ITIMER_VIRTUA.

zdw6868的博客 1872

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

linux如何挂定时器,如何在Linux下实现定时器

在Linux实现一个定时器,不像Win32下那样直观.在Win32调用SetTimer就行了,在Linux下则没有相应函数可以直接调用.定时器作为一个常用的功能,在Linux当然也有相应实现.下面我们看看几种常用的方法.要实现定时器功能,最土的办法实现莫过于用sleep/usleep来实现了.当然,它会阻塞当前线程,除了处理定时功能外,什么活也干不了.当然要解决这个问题不难,创建一个单独的线程来负...

weixin_40000301的博客 205

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

linux定时器数量限制,linux下如何实现多个定时器

最近在linux下写一个库,是给别人用的,要用到定时器这个功能,而且是多定时器任务的,在windows下实现是很方便的,但是在linux下就遇到了问题,linux下一个进程只能有一个定时器,如果我用了定时器去实现我的任务,那肯定是没问题的,如果用我库的人自己也创建了一个定时器,那么问题就出现了,我的定时器就被覆盖了。我的功能肯定也受到了影响,所以linux下的定时器是需要解决的。没办法,我就自己写...

weixin_42459078的博客 1070

Linux 下定时器的实现方式分析

<br />http://www.ibm.com/developerworks/cn/linux/l-cn-timers/index.html<br /> <br /> <br />概论<br />定时器属于基本的基础组件,不管是用户空间的程序开发,还是内核空间的程序开发,很多时候都需要有定时器作为基础组件的支持,但使用场景的不同,对定时器的实现考虑也不尽相同,本文讨论了在 Linux 环境下,应用层和内核层的定时器的各种实现方法,并分析了各种实现方法的利弊以及适宜的使用环境。<br />首先,给出一个基本

WINGCREATE的专栏 1225

linux下如何实现多个定时器

最近在linux下写一个库,是给别人用的,要用到定时器这个功能,而且是多定时器任务的,在windows下实现是很方便的,但是 在linux下就遇到了问题,linux下一个进程只能有一个定时器,如果我用了定时器去实现我的任务,那肯定是没问题的,如果用我库的人自己也创建了一个定时器, 那么问题就出现了,我的定时器就被覆盖了。 我的功能肯定也受到了影响,所以linux下的定时器是需要解决的。 没

cqltbe131421的博客 5419

linux下实现定时器,在Linux操作系统下实现定时器简介

在Linux实现一个定时器,不像Win32下那样直观。在Win32调用SetTimer就行了,在Linux下则没有相应函数可以直接调用。定时器作为一个常用的功能,在Linux当然也有相应实现。下面我们看看几种常用的方法。要实现定时器功能,最土的办法实现莫过于用sleep/usleep来实现了。当然,它会阻塞当前线程,除了处理定时功能外,什么活也干不了。当然要解决这个问题不难,创建一个单独的线程来负...

weixin_42350101的博客 563

linux下多定时器的实现 经典

linux下多定时器的实现 经典

gftygff的博客 843

定时器实现——基于Linux系统

先打个卡,下一篇将把各个系统上的定时器code总结一下。包括秒级、微秒级。 本篇为根据工程需求,在Linux系统上写的一个简单的定时器。 #include <sys/time.h> #include <string> class Timer { private: /* data */ timeval T_starttime; timeval T_pausetime; bool T_isstop; time_t T_timep; str

MoL的博客 562

linux 下定时器的实现方式分析

概论 定时器属于基本的基础组件,不管是用户空间的程序开发,还是内核空间的程序开发,很多时候都需要有定时器作为基础组件的支持,但使用场景的不同,对定时器的实现考虑也不尽相同,本文讨论了在 Linux 环境下,应用层和内核层的定时器的各种实现方法,并分析了各种实现方法的利弊以及适宜的使用环境。 首先,给出一个基本模型,定时器的实现,需要具备以下几个行为,这也是在后面评判各种定时器实现的一个基本模型

jibcy的专栏 784

Linux高精度定时器的实现

linux使用select实现精确定时器详解 Linux下实现定时器Timer的几种方法总结 LINUX内核定时器(高精度&低精度)实现循环定时 Linux时间子系统之六:高精度定时器(HRTIMER)的原理和实现 linux下jiffies定时器和hrtimer高精度定时器 ...

罗伯特祥的博客 3727
上一篇: 解析C语言中的sizeof
johnping
博客等级 码龄19年 3粉丝 11原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址