How to use millis() or micro() function in Arduino Due

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();

can you show your

code

Unsigned != unsigned.

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.