Function rust_hawktracer::ht_task_scheduler_get_optimal_tick_period [−][src]
pub unsafe extern "C" fn ht_task_scheduler_get_optimal_tick_period(
task_scheduler: *mut HT_TaskScheduler
) -> HT_DurationNs
Gets optimal tick period for scheduled tasks. The function returns the greatest common divisor of all task periods. E.g. for following periods of scheduled tasks: (10, 15, 25), optimal tick period is 5.
@note This function ignores tasks with period equal to 0. Therefore optimal tick period for task periods: (10, 15, 25, 0) is still 5.
@param task_scheduler a pointer to the scheduler.
@return optimal tick period.