This is one part of SteveB's implementation.
http://www.picbasic.co.uk/forum/showthread.php?t=365

Another version which also give you the codespace used and so on
http://www.picbasic.co.uk/forum/show...33&postcount=9

The whole story of the above
http://www.picbasic.co.uk/forum/show...9&postcount=13

If you have MPLAB, you could also use the StopWatch feature.

HTH