Hi,

I didn't calculate it, I measured it - as it says in the message ;-)

I put a TOGGLE PortC.0 just before the NEXT statement a put the scope on the pin. I got a 20kHz square wave which, because the pin is toggled each time thru loop, means it executes roughly 40000 times per second. 1/40000=25us