How to detect task overruns

It doesn’t end in FromISR, so can’t be assumed to be usable in an ISR.

Second, there is no function by that name, the closest is vTaslGetInfo, which also gets stack usage, and that can be somewhat time consuming, and is marked for limited usage.

Note. Detecting “ready” is also not a reliable method to see if it is done, as fetching the sensor data likely will use I/O with the task blocked during that I/O (you are not using busy-loop for I/O are you?). You want to know if it is DONE, and that needs some positive signal from the task doing the work.