The GATHERING of the Run Time stats is fairly low, basically a reading of the counter for the stats, subtracting the last read value in incrementing the usage of the task being switched out.
Reading ONE tasks stats are fairly quick too, reading that accumulated count.
The slow operation, is the act of trying to retrieve the stats of ALL tasks into a single buffer with coherent timing, which you don’t need, as you can just ask how much time the Idle task has taken compared to total run time (and perhaps make a delta since you last checked).