clock_gettime not working on iMX8M?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

clock_gettime not working on iMX8M?

635 Views
xianju_wang
Contributor I

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);

Thanks.

Xianju

Labels (1)
0 Kudos
1 Reply

562 Views
jimmychan
NXP TechSupport
NXP TechSupport
0 Kudos