zoukankan      html  css  js  c++  java
  • linux高编信号-------setitimer()、getitimer()

    /*************************
     *功能:获取时钟间隔
     *参数:which:设置哪个时钟
     *             ITIMER_REAL:实时递减,超时发送SIGALRM信号
     *             ITIMER_VIRTURL:虚拟时钟,超时发送SIGVALRM时钟
     *             ITIMER_PROF: 
     * **********************/
    int getitimer(int which, struct itimerval *curr_value);
    
    
    /*************************
     *功能:设置时钟间隔
     *参数:which:设置哪个时钟
     *             ITIMER_REAL:实时递减,超时发送SIGALRM信号
     *             ITIMER_VIRTURL:虚拟时钟,超时发送SIGVALRM时钟
     *             ITIMER_PROF: 
     *      new_value:新的时钟
     *      old_value:旧时间
     * **********************/
    int setitimer(int which, const struct itimerval *new_value,struct itimerval *old_value);
    
    //时间赋值是原子操作
    struct itimerval { struct timeval it_interval; /* next value */ struct timeval it_value; /* current value */ }; struct timeval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ };
  • 相关阅读:
    asp.net+Sqlserver 通过存储过程读取数据
    文字半透明显示在图片上
    饼形统计图
    折线统计图
    柱状统计图
    关于phonegap
    codesmith的使用
    asp.net读取Access数据库。
    Tomcat7.0安装配置
    freemarker数字格式化
  • 原文地址:https://www.cnblogs.com/muzihuan/p/5310669.html
Copyright © 2011-2022 走看看