clockblocks.moment.ResolvableMoment

class clockblocks.moment.ResolvableMoment(*args, **kwargs)[source]

Bases: Protocol

Anything that can name a point on a clock’s timeline. The scheduling layer (wait / wait_until / fork / schedule_action) accepts any ResolvableMoment and calls resolve(clock) to pin it to an absolute Moment on that clock. Moment and MetricPhaseTarget both implement this.

Methods

resolve(clock)

Pin this to an absolute Moment on the given clock.

resolve(clock: Clock) → Moment[source]

Pin this to an absolute Moment on the given clock.

Parameters:

clock – the clock whose timeline the result is measured against

Returns:

an absolute Moment on that clock