Go Down

Topic: How to use millis() or micro() function in Arduino Due (Read 4612 times) previous topic - next topic


I want to measure the execution time of my code using micros() function. I have previously used it in Arduino 2560. But when I am using it in Due, it is showing error. I assigned the time variable as -
Unsigned long time

and it is showing as
'long unsigned int time' redeclared as different kind of symbol

Please help me out.


maybe you need to typecast it?

unsigned long time

time = (unsigned long) millis();
A Radical Developing Unit In Northern Oklahoma


there are only 10 types of people
them that understands binary
and them that doesn't



Sorry that was a typo here. I used unsigned long time ...  :P


Perhaps newlib is defining the time() function, since it tries to follow POSIX.

Go Up