ark::pipeline::PeriodicTimerConfiguration

Defined in header “ark/pipeline/periodic_timer_config.hh”.


Configuration for a periodic timer.

Typedefs

  • using ExpectedRuntimesCallbackType = std::function< std::chrono::nanoseconds(std::chrono::nanoseconds, std::chrono::steady_clock::time_point)>
    Expected runtime callback signature.

Variables

  • std::string name
    A human-readable name for the timer.

  • PeriodicTimerFunction callback
    The callback to execute.

  • std::chrono::nanoseconds rate{0}
    The rate that this timer should execute at (every N nanoseconds).

  • std::optional< std::chrono::nanoseconds > expected_runtime{}
    The expected runtime for this timer. This determines how long we simulate the timer as running in the simclock runner.

    If left unset, this will use the runtime coming from the expected runtime configurations. If there is no expected runtime configurations, this defaults to 1ns.

  • bool trigger_immediately_on_startup= false
    Set to true if this timer should be considered ‘primed’ and execute immediately on pipeline startup. Typically, timers wait until ‘rate’ has expired at least once before firing. Setting this boolean to true will cause the timer to fire immediately when the executor enters normal execution.

  • ExpectedRuntimesCallbackType dynamic_expected_runtime
    The callback that is invoked when this subscriber is executed. simulation, so that the system can better simulate parallelization and things like dropped messages or latency.

    If this is set, this will override any expected runtimes coming from configuration files.