15{
16 auto node = wrapper.entity();
17 const auto& spec = wrapper.spec();
20
21 auto activation = std::make_shared<Kriya::TemporalActivation>(
23
25 activation->activate_node(node, spec.seconds, node_token, ctx.
channels.value());
26 }
else if (ctx.
channel.has_value()) {
27 activation->activate_node(node, spec.seconds, node_token, { ctx.channel.value() });
28 } else {
29 activation->activate_node(node, spec.seconds, node_token);
30 }
31
32 static std::vector<std::shared_ptr<Kriya::TemporalActivation>> active_timers;
33 active_timers.push_back(activation);
34
35 if (active_timers.size() > 100) {
36 std::erase_if(active_timers, [](const std::shared_ptr<Kriya::TemporalActivation>& t) {
37 return !t->is_active();
38 });
39 }
40
41 return node;
42}
MAYAFLUX_API Vruta::ProcessingToken get_task_token(Domain domain)
Extracts task processing token from domain.
MAYAFLUX_API Nodes::ProcessingToken get_node_token(Domain domain)
Extracts node 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.
std::optional< uint32_t > channel
std::optional< std::vector< uint32_t > > channels
std::optional< Domain > domain