clockblocks.utilities.wait
- clockblocks.utilities.wait(dt: float | ResolvableMoment, units='beats') None[source]
Block the clock currently active on this thread for
dtbeats (or seconds, ifunits="time"), yielding to the scheduler. Forwards towait().dtmay also be aMomentorMetricPhaseTarget, in which case it is resolved directly andunitsis ignored — e.g.wait(Moment.at_beat(8)).On a thread with no active clock, raises NoActiveClockError.
- Parameters:
dt – how long to wait — a number (in beats, or seconds if
units="time"), or a Moment / MetricPhaseTarget to wait until.units – either
"beats"or"time"(ignored whendtis a Moment).