[PD-dev] getting Pd logical time in C

Georg Holzmann grhPD at gmx.at
Fri May 19 17:20:34 CEST 2006


Hallo!

So you mean something like a singleton-pattern?
Frank posted a (non-C) solution for that some time ago on the list ...
(the thread was called "Symbols and Singletons")

LG
Georg

> Logical time wouldn't work for that, as two objects in the same patch are
> created at teh same logical time.  I'd suggest code like:
> 
> {
>   static int initted = 0;
>   if  (!initted)
>   {
>     .. this code only runs once ..
>     initted = 1;
>   }
> }
> 
> cheers
> M
> 
> On Fri, May 19, 2006 at 11:37:45AM +0200, Hans-Christoph Steiner wrote:
> 
>>I want to get the logical time so I can make the first instance of  
>>the object execute something while the rest do not execute.
>>
>>Any suggestions as how to do this?
>>
>>.hc
>>
>>________________________________________________________________________ 
>>____
>>
>>If you are not part of the solution, you are part of the problem.
>>                                                              -  
>>Eldridge Cleaver
>>
>>
>>_______________________________________________
>>PD-dev mailing list
>>PD-dev at iem.at
>>http://lists.puredata.info/listinfo/pd-dev
> 
> 
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
> 
> 





More information about the Pd-dev mailing list