MICROSECONDS in clock() SDK function

Cristian's icon

Hi,
i need a function that returns microseconds.
Using clock() from time.h i can have only millisecond and i also can' t understand why.
Can Max/MSP receive microseconds from a custom external or have i to change software after 12 years of satisfaction ?

Thanks a lot !
Cristiano

Jeremy's icon
/**
    While most Max timing references "logical" time derived from Max's millisecond scheduler, 
    time values produced by the systimer_gettime() are referenced from the CPU clock and can be used 
    to time real world events with microsecond precision.
    
    The standard 'cpuclock' external in Max is a simple wrapper around this function.
    
    @ingroup    clocks
    @return        Returns the current real-world time.
*/
double systimer_gettime(void);

Cristian's icon

Thank you very much !
I`ll try both.