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

Chapter 23. Timers and Sleeping

A timer allows a process to schedule a notification for itself to occur at some time in the future. Sleeping allows a process (or thread) to suspend execution for a period of time. This chapter describes the interfaces used for setting timers and for sleeping. It covers the following topics:

  • the classical UNIX APIs for setting interval timers (setitimer() and alarm()) to notify a process when a certain amount of time has passed;

  • the APIs that allow a process to sleep for a specified interval;

  • the POSIX.1b clocks and timers APIs; and

  • the Linux-specific timerfd facility, which allows the creation of timers whose expirations can be read from a file descriptor.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

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

  

Start a Free 10-Day Trial


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