Hi,<br><br>I'm new to Pd, and I'm trying to write an external and thanks to johannes' HOWTO, the process hasn't been so painful. However, I haven't found how to solve this problem (I looked the source code of the timer, pipe, and line objects that do something alike, but I'm not sure if it will work):<br>I receive a list by one inlet and perform some computation with the data until a new list arrives or the execution reach a time limit defined by the user as a parameter of the object. <br>The method should put whatever value it got to one outlet if it reach the deadline, and wait for new data to arrive. If data arrives before the deadline, the method should abort the ongoing computation and start doing it again with the new data.<br>I tried this simple example to see if the mechanism will work:<br><br>void foo(t_interrupt *x){<br>&nbsp;&nbsp;&nbsp; int i=0;<br>&nbsp;&nbsp;&nbsp; double timenow = clock_getlogicaltime(); <br>&nbsp;&nbsp;&nbsp; post("timenow =&nbsp;
 %f",timenow);<br>&nbsp;&nbsp;&nbsp; while(i&lt;=10000)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i++;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; post("now&nbsp; =&nbsp; %f",clock_gettimesince(timenow));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>but I only get 0.0000 as outputs... Furthermore, I'm not sure if it will work. Should I make a class that implements the calculation in its own thread? or Pd's scheduling methods will do the job?... <br><br>Any help will be highly appreciated, I've spent in this quite a long time now...<br><br>Thanks in advance.<br><BR><BR>Julian Villegas<br><br>University of Aizu<br>Synthetic Worlds Laboratory<br>Aizu - Wakamatsu Fukushima<br>Japan 965 - 8580<br><br>Me pregunto de un modo pensativo<br>Que significa ser colombiano?<br>No se le respondi. Es un acto de fe<br>                                        JLB.<p>
                <hr size=1><a href="http://us.rd.yahoo.com/mail_us/taglines/postman3/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com">Yahoo! Messenger with Voice.</a> PC-to-Phone calls for ridiculously low rates.