set_fallback_execution_timer_config

Function set_fallback_execution_timer_config 

Source
pub fn set_fallback_execution_timer_config(config: Option<ExecutionTimerConfig>)
Expand description

Sets the process-wide fallback configuration for the execution time limiter. Engine instances can override this fallback via Engine::set_execution_timer_config.

ยงExamples

use std::num::NonZeroU32;
use std::time::Duration;
use regorus::utils::limits::{
    fallback_execution_timer_config,
    set_fallback_execution_timer_config,
    ExecutionTimerConfig,
};

let config = ExecutionTimerConfig {
    limit: Duration::from_secs(1),
    check_interval: NonZeroU32::new(10).unwrap(),
};
set_fallback_execution_timer_config(Some(config));
assert_eq!(fallback_execution_timer_config(), Some(config));