title: How to make timed queue in javascript
body: <p>Ok. I don't have a code for this question. I am asking this because I am new to javascript. I would like to know how to create a timed queue in JS. Here is the trick. </p>
  
  <p>I have a combobox. The combobox has extjs data store behind and its getting updated with new data every 5 seconds, i.e the combo will get new row entries. </p>
  
  <p>The row entries can be of three types 1,2 and 3. There can be several rows of same type but with different row id. Each row will be removed from the combo if there is no update for 5 minutes. This means if I get new row from the store with type 3 it will stay in the combo for 5 minutes. If the same row appears (with the same id and type) in the new data fetched the 5 minutes timer gets reset and again counts 5 minutes. And so forth. </p>
  
  <p>How to achieve this functionality in javascript.</p>
  
  <p>Please write comments if not understood. </p>
  
  <p>Here is an example:</p>
  
  <pre><code>row_1 type1 5 min timer start
  row_2 type1 5 min timer start
  row_3 type3 5 min timer start
  row_2 type2 5 min timer start
  </code></pre>
  
  <p>This is an example of the current data fetched. After 3 minutes I get this data.</p>
  
  <pre><code>row_3 type3 5 min timer start
  </code></pre>
  
  <p>the rest of the rows timers continue until 5 min limit is reached but for row three the timer gets reset and it will stay in the combo for the next 5 minutes. </p>