[PD-dev] using t_time for clock functions

Hans-Christoph Steiner hans at at.or.at
Thu Dec 31 06:05:04 CET 2009

Another thing Günter did in PDa is introduce t_time for the clock  
functions instead of using 'double' directly.  Any reason not to  
include t_time in vanilla?

+typedef long long t_time;
  EXTERN t_clock *clock_new(void *owner, t_method fn);
-EXTERN void clock_set(t_clock *x, double systime);
-EXTERN void clock_delay(t_clock *x, double delaytime);
+EXTERN void clock_set(t_clock *x, t_time systime);
+EXTERN void clock_delay(t_clock *x, t_time delaytime);
  EXTERN void clock_unset(t_clock *x);
-EXTERN double clock_getlogicaltime(void);
-EXTERN double clock_getsystime(void); /* OBSOLETE; use  
clock_getlogicaltime() */
-EXTERN double clock_gettimesince(double prevsystime);
-EXTERN double clock_getsystimeafter(double delaytime);
+EXTERN t_time clock_getlogicaltime(void);
+EXTERN t_time clock_getsystime(void); /* OBSOLETE; use  
clock_getlogicaltime() */
+EXTERN t_time clock_gettimesince(t_time prevsystime);
+EXTERN t_time clock_getsystimeafter(t_time delaytime);
  EXTERN void clock_free(t_clock *x);




More information about the Pd-dev mailing list