title: Allowing a gen_fsm to timeout if it receives no messages
body: <p>Normally if I'd like to have an Erlang process timeout I would use the following construct:</p>
  
  <pre><code>receive 
      Msg -&gt; ok; %% handle message
  after 60000 -&gt;
      %% Handle timeout and exit
  end.
  </code></pre>
  
  <p>Is there a similar mechanism in the OTP servers such as gen_fsm? I will be spawning gen_fsm's for each active session with my application, and would like to have them exit if a timeout value for inactivity is exceeded after receiving a message.</p>
  
  <p>I can write my own custom process if need be, but would prefer to use a gen_fsm if possible.</p>