Update of /cvsroot/pure-data/pd/extra/pureunity In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15469
Modified Files: Tag: desiredata pureunity.c Log Message: remove [rtimer] (redundant: use [realtime] instead)
Index: pureunity.c =================================================================== RCS file: /cvsroot/pure-data/pd/extra/pureunity/Attic/pureunity.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** pureunity.c 5 Jan 2007 07:08:57 -0000 1.1.2.2 --- pureunity.c 28 Jun 2007 03:21:16 -0000 1.1.2.3 *************** *** 25,51 **** #define ALIAS(y,x) class_addcreator((t_newmethod)getfn(m,gensym(x)),gensym(y),A_GIMME,0);
- typedef struct { - t_text o; - struct timeval t0; - } t_rtimer; - - t_class *rtimer_class; - void rtimer_reset(t_rtimer *self) {gettimeofday(&self->t0,0);} - void *rtimer_new(t_symbol *s) { - t_rtimer *self = (t_rtimer *)pd_new(rtimer_class); - inlet_new((t_text *)self, (t_pd *)self, gensym("bang"), gensym("1_bang")); - outlet_new((t_text *)self, gensym("float")); - rtimer_reset(self); - return self; - } - - void rtimer_1_bang(t_rtimer *self) { - struct timeval t1; - gettimeofday(&t1,0); - outlet_float(self->o.ob_outlet, - (t1.tv_sec -self->t0.tv_sec )*1000.0 + - (t1.tv_usec-self->t0.tv_usec)/1000.0); - } - void pureunity_setup() { t_pd *m = &pd_objectmaker; --- 25,28 ---- *************** *** 57,63 **** ALIAS("outlet.~","outlet~"); ALIAS( "f.swap","swap" ); - rtimer_class = class_new(gensym("rtimer"),(t_newmethod)rtimer_new,0,sizeof(t_rtimer),0,0); - class_addbang(rtimer_class,rtimer_reset); - class_addmethod(rtimer_class, (t_method)rtimer_1_bang, gensym("1_bang"), 0); }
--- 34,37 ----