(root)/
util-linux-2.39/
include/
timer.h
       1  /*
       2   * No copyright is claimed.  This code is in the public domain; do with
       3   * it what you wish.
       4   */
       5  #ifndef UTIL_LINUX_TIMER_H
       6  #define UTIL_LINUX_TIMER_H
       7  
       8  #include <signal.h>
       9  #include <sys/time.h>
      10  
      11  #ifdef HAVE_TIMER_CREATE
      12  struct ul_timer {
      13  	timer_t t_id;
      14  };
      15  #else
      16  struct ul_timer {
      17  	struct itimerval old_timer;
      18  	struct sigaction old_sa;
      19  };
      20  #endif
      21  
      22  extern int setup_timer(struct ul_timer *timer, struct itimerval *timeout,
      23  		       void (*timeout_handler)(int, siginfo_t *, void *));
      24  extern void cancel_timer(struct ul_timer *timer);
      25  
      26  #endif /* UTIL_LINUX_TIMER_H */