Pages: [1]   Go Down
Author Topic: How to use millis() or micro() function in Arduino Due  (Read 342 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Brasil
Offline Offline
Full Member
***
Karma: 4
Posts: 125
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If saving to a variable, you should do like this:

Code:
long actualTime = micros(); // Or, millis();
Logged


Pages: [1]   Go Up
Jump to: