Can't understand why timer can measure intervals of 0. ms

Jul 18, 2013 at 1:03pm

Can't understand why timer can measure intervals of 0. ms


I have a timer object triggered by a dial, which receives a bang in its right inlet then another bang immedialely afterwards in its left inlet (“t b b”). However this timer sometimes reports time intervals of 0. ms. How is it possible altough both scheduler and event interval cannot be set with values lower than 1. ms ? I suppose it could go below 1. ms when using scheduler in audio interrupt but this is not the case here thus I see no reason for this measurement.

That’s a recurrent observation actually but I’d really like to know how this can happen.

Jul 18, 2013 at 10:30pm

If you want to measure the “real world” time use [cpuclock] instead.

Jul 19, 2013 at 1:16am

i dont think that the event interval setting has something to do with the speed messages can be transported. event interval only affects the GUI but not at all the message queue. you can have hundreds of messages sent within one 1 ms if the computer is fast enough.
why timer can show 0.0? i can only guess: the second bang is coming so fast, that the 32-bit limit disallows max from displaying it more exact than 0.0 – or times uses less than 32 bit, for example 0.001 milliseconds. the latter is probably more realistic. ;)

Jul 19, 2013 at 1:19am


Jul 19, 2013 at 1:20am

jokes aside, i just looked into the docs, and they say that the number of events per ms in the high priority thread is (only) 20 by default. did you eventually change that to 10,000?

Jul 19, 2013 at 2:28am


1. Both bang in your [t b b] (and everything below) is included in one event. [timer] report the “logical” time. So it reports zero.
2. You should have a look on [cpuclock] and [next].

Jul 19, 2013 at 2:54am

I’ll have a look at cpuclock and next. However feeding two bangs into timer’s left then right inlet does not reports zero because the first bang (send to the right inlet) ends the measurement while the second starts the next measurement. A measurement of O. ms means that the trigger object was triggered twice in a very short period (probably shorter than 1. ms and rounded to 0. because of 32 bits precision as indicated by Roman).

By the way, no I haven’t changed the poll throtte (as stated in a parallel thread I have also initiated, I think all the settings related to the scheduler should benefit from advanced tutorials and examples).

Thanks for helping.


You must be logged in to reply to this topic.