There is a better way. Check out the RT_INFO instruction. It can be called with a number of different modes, to give you the cycle time for OB1 or the execution time of any other OB, as well as the time spent on communications processing.
Look under Extended Instructions-> Diagnostics