Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

23. Timers and Sleeping > POSIX Interval Timers

POSIX Interval Timers

The classical UNIX interval timers set by setitimer() suffer a number of limitations:

  • We can set only one timer of each of the three types, ITIMER_REAL, ITIMER_VIRTUAL, and ITIMER_PROF.

  • The only way of being notified of timer expiration is via delivery of a signal. Furthermore, we can’t change the signal that is generated when the timer expires.

  • If an interval timer expires multiple times while the corresponding signal is blocked, then the signal handler is called only once. In other words, we have no way of knowing whether there was a timeroverrun.

  • Timers are limited to microsecond resolution. However, some systems have hardware clocks that provide finer resolution than this, and, on such systems, it is desirable to have software access to this greater resolution.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint