2022-09-19 03:34 AM
2022-09-19 06:18 AM
Use a timer or the cycle counter if the MCU has one.
Not clear from the framing of the question which MCU or OS you're talking about.
2022-09-22 01:52 AM
hello @Cv.1,
This question is much a standard C Linux coding question, but the natural solution would be the next one..
If you have the control of the code you run, you should know where is the entry point of your thread after its start, and where it will finish before its destruction.
Just setting up a timer that start at the beginning and stop before the end of the thread should be OK for the information you ask.
Kind regards,
Erwan.