Thanks,<br><br>I&#39;ve posted the code at <a href="http://www.uwm.edu/%7Egssurges/histogram.c">http://www.uwm.edu/~gssurges/histogram.c</a><br><br>Hope it makes sense...<br><br>-Greg<br><br><div class="gmail_quote">On Sat, Mar 22, 2008 at 11:06 AM, Hans-Christoph Steiner &lt;<a href="mailto:hans@eds.org">hans@eds.org</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="">
<div><br></div><div>If you post the code, it would be much easier to tell what&#39;s happening. &nbsp;My guess is that you can only have one delay set for a given clock, so like this:</div><div><br></div><div>- 76 sets the timer</div>
<div>- 32 resets the timer with new info</div><div><br></div><div>Therefore the timer callback set by 76 never gets called. &nbsp;(Something like that, it&#39;s still morning here ;)</div><div><br></div><div>.hc</div><div><div>
</div><div class="Wj3C7c"><br><div><div>On Mar 21, 2008, at 11:24 PM, Greg Surges wrote:</div><br><blockquote type="cite">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/%7Egssurges/" target="_blank">http://www.uwm.edu/~gssurges/</a></blockquote></div><br></div></div><div> <span style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br>
<div><br></div><div><br></div><div>----------------------------------------------------------------------------</div><div><br></div><div>You can&#39;t steal a gift. Bird gave the world his music, and if you can hear it, you can have it. - Dizzy Gillespie</div>
<div><br></div><br></span> </div><br></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.uwm.edu/~gssurges/">http://www.uwm.edu/~gssurges/</a>