MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ then()

EventChain & MayaFlux::Kriya::EventChain::then ( std::function< void()>  action,
double  delay_seconds = 0.F 
)

Adds an event to the chain with a specified delay.

Parameters
actionFunction to execute when the event occurs
delay_secondsTime to wait before executing this event (in seconds)
Returns
Reference to this EventChain for method chaining

This method adds an event to the chain, to be executed after the specified delay from the previous event. The first event's delay is measured from when start() is called.

The method returns a reference to the EventChain itself, allowing for a fluent, declarative API style.

Definition at line 22 of file Chain.cpp.

23{
24 m_events.push_back({ std::move(action), delay_seconds });
25 return *this;
26}
std::vector< TimedEvent > m_events
Collection of events in this chain.
Definition Chain.hpp:105

References m_events.

Referenced by MayaFlux::Kriya::Sequence::execute().

+ Here is the caller graph for this function: