Old code "if timeout is zero then set timeout value to magic number" and "if timer is set and timer is not timed out". (In some occasion timeout value can be set to magic number even if timeout is not zero.)
New code: "unset timer means set timer to zero" and "if timer is not timed out" (zero timer always timed out).