Go Down

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

sohini25

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.

JHawk88

maybe you need to typecast it?

unsigned long time

time = (unsigned long) millis();
Remember remember, the 4th of...July!  Duh.

mmcp42

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

KeithRB


sohini25

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