How to calculate the time deadlines for a given task ?

I’m a beginner of the ardupilot. When I check the source code (arducopter.cpp), I found there are several maximum time here:


/*
scheduler table for fast CPUs - all regular tasks apart from the fast_loop()
should be listed here, along with how often they should be called (in hz)
and the maximum time they are expected to take (in microseconds)
*/
const AP_Scheduler::Task Copter::scheduler_tasks[] = {
SCHED_TASK(rc_loop, 100, 130),

My questions are:

  1. how do you calculate these time deadlines?
  2. Is there any way that I can calculate such time deadline of a given function/task?

Thanks in advance!

any idea about this question?