clock_gettime not working on iMX8M?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

clock_gettime not working on iMX8M?

1,323 次查看
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

标签 (1)
0 项奖励
回复
1 回复

1,250 次查看
jimmychan
NXP TechSupport
NXP TechSupport
0 项奖励
回复