Forum Discussion
Altera_Forum
Honored Contributor
12 years agoOk. I added an Interval Timer to my system, I attached it to the sys_clk_timer in the BSP editor, but now my program doesn't seem to work.
printf("LOADING...\n\n");
start = times(NULL);
//Lots of work here
stop = times(NULL);
t_total = ((double)stop-(double)start) / alt_ticks_per_second();
printf("Start = %d\n", start);
printf("Stop = %d\n", stop);
printf("Total time = %f\n", t_total); Before adding the Interval timer I got 0s on Start and Stop. Now the NIOS console doesn't show anything, not even the LOADING print at the top. Please, I need some help to measure the execution time of my code! Thanks!