|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Kriya::Timer::schedule | ( | double | delay_seconds, |
| std::function< void()> | callback | ||
| ) |
Schedules a callback to execute after a delay.
| delay_seconds | Time to wait before executing the callback (in seconds) |
| callback | Function to execute after the delay |
This method schedules the provided callback to execute after exactly the specified delay. If a callback is already scheduled, it is cancelled and replaced with the new one.
The timing is sample-accurate, ensuring that the callback executes at precisely the right moment in the processing timeline.
Definition at line 18 of file Timers.cpp.
References MayaFlux::Vruta::TaskScheduler::add_task(), cancel(), MayaFlux::Vruta::TaskScheduler::current_units(), m_active, m_callback, m_routine, m_Scheduler, MayaFlux::Vruta::TaskScheduler::seconds_to_samples(), and token.
Referenced by MayaFlux::Kriya::TimedAction::execute(), MayaFlux::Kriya::NodeTimer::play_for(), and MayaFlux::Kriya::NodeTimer::play_with_processing().
Here is the call graph for this function:
Here is the caller graph for this function: