Hello
If I understand your intention, you want the program guess the during time of executing a method before calling it. For example:
IF MyMethod.TakeLong <= 5ms THEN RUN MYMethod
If you want it I suggest that forget it. It's very very complicated and high mistake risk.
I think you can call a method in another thread and after taking n seconds then abort the thread.