clock_gettime not working on iMX8M?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

clock_gettime not working on iMX8M?

1,330件の閲覧回数
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,257件の閲覧回数
jimmychan
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信