Skip to main content

set_enabled

Function set_enabled 

Source
pub fn set_enabled(enabled: bool) -> bool
Expand description

Enables or disables task timing collection at runtime.

When transitioning from enabled to disabled, add_task_timing becomes a no-op and the existing per-thread buffers are cleared so stale data isn’t reported after a later re-enable. Calls with the current value are a no-op.