
5 Oct
2006
5 Oct
'06
9:52 a.m.
hi all, i'm still struggling with the basics of chuck, it seems. let's say i have a process i want to have executed regularly, like a simple click of an impulse. is it more appropriate for chuck's liking to advance time inside the impulse function and spork it only once, or to spork the impulse function regularly? volker. // begin example 1 Impulse i => dac; fun void click() { while(true) { 1.0 => i.next; 0.5::second => now; } } spork ~click(); while( true ) 1::second => now; // end example 1 // begin example 2 Impulse i => dac; fun void click() { 1.0 => i.next; } while( true ) { spork ~click(); 0.5::second => now; } // end example 2