title: Simple round robin (moving average) array in C#
body: <p>As a diagnostic, I want to display the number of cycles per second in my app. (Think frames-per-second in a first-person-shooter.)</p>
  
  <p>But I don't want to display the most recent value, or the average since launch. What I want to calculate is the mean of the last X values.</p>
  
  <p>My question is, I suppose, about the best way to store these values. My first thought was to create a fixed size array, so each new value would push out the oldest. Is this the best way to do it? If so, how would I implement it?</p>
  
  <p><strong>EDIT:</strong>
  Here's the class I wrote: <a href="http://pastebin.com/U3cq7EVH" rel="nofollow noreferrer">RRQueue</a>. It inherits Queue, but enforces the capacity and dequeues if necessary.</p>
  
  <p><strong>EDIT 2:</strong>
  Pastebin is so passé. Now on <a href="https://github.com/tdwright/RRQueue" rel="nofollow noreferrer">a GitHub repo</a>.</p>