Some general notes about the code:

Note that the example above shows just one way of implementing timeouts for clients. Later in this chapter (in Kernel timeouts), we'll talk about kernel timeouts, which are another way of implementing almost the exact same thing, except that it's driven by the client, rather than a timer.