[solved] Report elapsed sample time between two events
Hi,
What is the easy way to report elapsed sample time between two events like timer object? My patch seems work to some extent but I want to know whether there are more simple way.

Hi!
Yes, the [timer] object :)

Thank you for sharing, and sorry for the lack of explanation.
Time resolution of milliseconds by timer object is not enough for controlling buffer at my purpose since 1ms is 48samples.
So, I want to know easy way to confirm the interval by sample counts.
Right, you mentioned timer hehe
If samples is what you're after then gen~ is the way to go, you can find an [elapsed] object as part of the gen system. Maybe build on the logic you already have.
I have a lot of gen~ study to do myself.

Using [cpuclock] is more precise than [timer], but if you want an actual sample count, probably go with what Martin suggested.
timer outputs fractional ms which you can then convert to samples via mstosamps

What a noob I am! I hadn't realized that timer outputs a floating number of milliseconds since I've connected it to a number(i) when I test. Thank you so much!