Home/Support/Support Forum/Getting Milliseconds
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Getting Milliseconds

0 votes
Good day.

As I understand time() only has a resolution of 1second.

So I have tried to use clock() with no success.

I have enabled the BSP_INCLUDE_RTC_DRIVER in the bsp if that helps.

If I run:

int i,j,k = 0;
for (i = 0; i < 100; i++)
for (j = 0; j < 100; j++)
for (k = 0; k < 100; k++)
printf("%ld\n", clock());

clock() just return 0.

So either I'm doing somthing wrong or I'm doing something wrong.

Any advise would be welcome
asked Oct 27, 2010 in NET+OS by derwee New to the Community (4 points)
recategorized Nov 26, 2013 by tuxembb

Please log in or register to answer this question.