Go Down

Topic: How to use millis() or micro() function in Arduino Due (Read 2080 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();
Remember remember, the 4th of...July!  Duh.


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

Paul Stoffregen

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

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131