Thanks all,<br><br>I&#39;m still stuck. Is there a way to interleave calls to clock_delay()?<br><br>I&#39;ll explain what I mean:<br><br>I&#39;m coding (trying to, anyway) a histogram object. I&#39;m using integers from input to increment the values stored in an array. For example, if 76 is received as input, the value in the array at index 76 is incremented. This way, there&#39;s a running total of the frequency with which a number occurs.<br>
<br>The problem is, I want the histogram to have a time window. So, a specified amount of time after an index is incremented, it should decrement automatically. I&#39;m calling clock_delay() in the array incrementing function, which calls the decrementing function after the specified &quot;decay&quot; time. However, if you have two or more inputs before the decay time is up, only the most recent call from clock_delay() completes.<br>
<br>What&#39;s happening is:<br>(Decay time of 2 seconds)<br>76 is input at 0:00<br>32 is input at 0:015<br><br>32 decrements at 0:035<br><br><br>What I want to happen is:<br>(Decay time is 2 seconds)<br>76 is input at 0:00<br>
32 is input at 0:015<br><br>76 decrements at 0:02<br>32 decrements at 0:035<br><br>Can anyone help me with a way around this?<br><br>Thanks again, this community has been really friendly and helpful as I start out learning.<br>
<br>-Greg Surges<br><br><a href="http://www.uwm.edu/~gssurges/">http://www.uwm.edu/~gssurges/</a>