Chapter 17 . Timers

In Chapter 15, "Signals," you were introduced to the alarm(3) function, which enables you to create and cancel a timer. This function provides a timer service that has its time resolution measured in seconds.

This chapter will begin with a hypothetical implementation of the sleep(2) function call. This will provide additional insight into why there is a conflict between the use of alarm(3) and sleep(2). Later you'll learn that the conflict may extend to other UNIX functions.

This chapter also will introduce you to

  • Fine-grained timers such as usleep(3) and nanosleep(2)

  • The interval timer functions

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.26.217