title: Multiple alarms in C?
body: <p>This is probably a very basic question, but I'm using the code below to run a simple alarm. It works as I want it to, but I'm wondering if it's at all possible to run multiple alarms simultaneously that each trigger a different function when complete. Is there a way to do that?</p>
  
  <pre><code>#include &lt;signal.h&gt;
  #include &lt;sys/time.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;time.h&gt;
  
  void alarm_handler(int signum){
      printf("five seconds passed!!\n");
  }
  int main(){
      signal(SIGALRM, alarm_handler);
      alarm(5);
  
      pause();
      return 0;
  }
  </code></pre>