title: Java counter with value for last one hour
body: <p>I need a counter which will get incremented as certain tasks are complete. We need the value for only <strong>last one hour</strong>, ie the window will be moving and not for static hours.</p>
  
  <p>What is the best way to go about this? One way I could think of was having an array of size 60, one for each minute and update the entry for respective minute and do a total of this on a get(). On turning to a new minute, the array will be reset.</p>
  
  <p>Are there better solutions? Any time based implementations of Counter available?</p>