AnsweredAssumed Answered

clock_gettime not working on iMX8M?

Question asked by xianju wang on Jun 25, 2019
Latest reply on Jun 27, 2019 by jimmychan

I am using iMX8M Quad EVK. I am trying to use clock_gettime() to calculate how much time myfunction runs on Cortex-M4. But stop.tv_nsec and start.tv_nsec both are zero.  


clock_gettime(CLOCK_REALTIME, &start);

myfunction(s1, b_fb, y);


clock_gettime(CLOCK_REALTIME, &stop);

printf("%ld\n", stop.tv_nsec);
printf("%ld\n", start.tv_nsec);