title: Want to Implement Timeout for one function in C
body: <p>Here i have one function which is listen mode. this function listing something which i got form some device.</p>
  
  <p>Here when my function is in listen mode that time i want to create timeout. if i will not get any response from particular device than i want o exit from this function and have to notify.</p>
  
  <p>if during this timeout period if i will get response from device than i have to continue with work and stop this timeout and there is no limits to complete this work in any time duration.</p>
  
  <p>So how can i implement this thing for a function.</p>
  
  <p>Any body please can me help me to implement this thing with timeout functionality.</p>