easier solution... place HIGH LED on the begining and LOW LED and the end of your code... do a loop and measure with a scope or frequency meter. this will be close to what you need.


regards`