I am using Linux on a microcontroller with 2 A72 cores, running my app on that, I am trying to measure runtime of a function in app using system call:
clock_gettime(CLOCK_PROCESS_CPUTIME_ID , &tv);
before and after the function, and calculate the CPU time function used, I do this for thousands of times to profile this function over long run of input data, it happens that I get very large runtime readings randomly in each run(sometimes not, but the overall curve of data is same and consistent), my explanation that this is system interrupts corrupts my runtime measuring, what do you think ?how to disable it?
I tried to give my app highest priority but still have the issue