[Gridflow-dev] Clock wrapper

Mathieu Bouchard matju at sympatico.ca
Tue Jan 18 08:01:48 EST 2005


As of right now, the way to make clocks in GridFlow changes completely. Up
to now, it was some kind of thing independent from Pd called $mainloop
and $tasks. For some reason I wasn't using the former much, although it
was much more sophisticated.

Now those two things should disappear from the sourcecode, and instead, a
thing called Clock will be used. It works like this (from Ruby):

myclock = Clock.new proc {
	GridFlow.post "hello after five seconds"
}
# setting the delay in milliseconds
myclock.delay 5000

that's it!



there's also .set(ms) that's like .delay(ms) but in absolute logicaltime
(chances are you don't need touch this) and .unset() for cancelling a .set
or .delay ...

hope that's clear enough. It's a straight translation from m_pd.h to Ruby,
btw.

_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju



More information about the Gridflow-dev mailing list