scheduler_settime not working?

Jul 18, 2013 at 6:25pm

scheduler_settime not working?

Hi everyone

I’m coding an external for Max 6.1, and have the following code that attempts to set the current time of a scheduler to 0:
x->playbackClock = scheduler_new();
// some time passes
scheduler_settime(x->playbackClock, 0.);
scheduler_gettime (x->playbackClock, &currTime );
post("Tried setting to zero, but got %f",currTime);

If I understand correctly, I should get a value of almost 0 (perhaps a millisecond or two might pass between the settime and gettime).

But instead I get the following output in the Max window:
Tried setting to zero, but got 4289.000000
Tried setting to zero, but got 5291.000000
Tried setting to zero, but got 7446.000000

This is just the elapsed time since the patch opened. Is there are bug, or am I misunderstanding the creation of a local scheduler?


Jul 20, 2013 at 9:04am


The “scheduler_” series is puzzling. I still don’t know if it needs to be freed ( ) or not. A vague idea about a cache/restore mechanism but without any reliable example and without more precision from cycling74, i avoided to use it (and i guess Andrea gave up also).

Jul 20, 2013 at 2:32pm

I’m glad it’s not just me! I find the documentation completely opaque and confusing. (clocks, setclocks and schedulers? argh!)

I think I’ll just call the system clock and do a subtraction.


You must be logged in to reply to this topic.