Something like that though I'm sure I've missed a bracket somewhere.... :-)
Ehehe, this time i don't think so!!! Can you tell me hoe do i do the math so i can have a value in seconds or miliseconds.
I'm using a 8Mhz osc, so with Fosc/a i get 2Mhz, so 0.5uS for cycle. I must multiply this value for the value that i've got in the time var?
Thank you Henrik

MPLAB stopwatch also do the trick pretty well

If you have a Scope, set a pin high before the section of code you want measure, and clear it at thye end. not as accurate as Timer or StopWatch but easy easy easy
I'm using MCS, i'm not used to use MPLAB, i think that way with the scope its better. Thank you Steve