45{
46 auto buffer = wrapper.entity();
47 const auto& spec = wrapper.spec();
50
51 auto activation = std::make_shared<Kriya::TemporalActivation>(
53
55 activation->activate_buffer(buffer, spec.seconds, buffer_token, ctx.
channel.value());
57 activation->activate_buffer(buffer, spec.seconds, buffer_token, ctx.
channels.value()[0]);
58 } else {
59 activation->activate_buffer(buffer, spec.seconds, buffer_token);
60 }
61
62 static std::vector<std::shared_ptr<Kriya::TemporalActivation>> active_timers;
63 active_timers.push_back(activation);
64
65 if (active_timers.size() > 100) {
66 std::erase_if(active_timers, [](const std::shared_ptr<Kriya::TemporalActivation>& t) {
67 return !t->is_active();
68 });
69 }
70
71 return buffer;
72}
MAYAFLUX_API Vruta::ProcessingToken get_task_token(Domain domain)
Extracts task processing token from domain.
std::shared_ptr< Nodes::NodeGraphManager > get_node_graph_manager()
Gets the node graph manager from the default engine.
std::shared_ptr< Buffers::BufferManager > get_buffer_manager()
Gets the buffer manager from the default engine.
std::shared_ptr< Vruta::TaskScheduler > get_scheduler()
Gets the task scheduler from the default engine.
MAYAFLUX_API Buffers::ProcessingToken get_buffer_token(Domain domain)
Extracts buffer processing token from domain.
std::optional< uint32_t > channel
std::optional< std::vector< uint32_t > > channels
std::optional< Domain > domain