Altera_Forum
Honored Contributor
13 years agoNios2 and timer
Hi all forumers !!
I'm totally new to fpgas and I'm trying to get my best !! But now I really need some suggestions.. I'm implementing a routine in C with quartus that uses a timer but I cannot find how to get it... I need to implement something like that:#include<time.h>
..... some code here .....
time_t start,now;
time(&start);
seconds = 0;
while seconds < 1 {
... do something...
time(&now);
seconds=(uint8_t) difftime(now,start);
}
by the way it seems not working... i always get seconds==0. There is a better way to get it works ?? Thank you for your support !! Have a nice day !