title: itimerval timer restart and stop
body: <p>how can I stop the timer and give it a new time to expire?</p>
  
  <p>how can I restart the timer after it been ended?</p>
  
  <p>how can I restart the timer from the signal handler (handler_func)?</p>
  
  <p>example:</p>
  
  <pre><code>struct sigaction real_sa;
  struct itimerval real_timer;
  real_sa.sa_handler = &amp;handler_func;
  
  if (sigaction(SIGALRM, &amp;real_sa,NULL) &lt; 0) {
      std::cerr &lt;&lt; "system error: sigaction error\\n" &lt;&lt;
                std::endl;
      exit(1);
  }
  real_timer.it_value.tv_sec = (absolute_time/1000000);
  real_timer.it_value.tv_usec = (absolute_time % 1000000);
  if (setitimer (ITIMER_REAL, &amp;real_timer, NULL))
  {
      std::cerr &lt;&lt; "system error: setitimer error\\n" &lt;&lt;
                std::endl;
      exit(1);
  }
  </code></pre>
  
  <p>thanks in advance</p>
  
  <p>edit : this code  develop on linux environment and should work on linux (other platform are not important to me)</p>