You need to sign in to do that
Don't have an account?

Maximum # of Statements
There is a maximum # of statements that you can execute during a single invocation of APEX.
Is there any way to programatically determine how close I am to that imit? I have a recursive procedure that I want to run until it gets close to the limit and then turn itself off before it triggers an unrecoverable error. (you cannot catch that type of error)
While I'm at it I wouldn't mind knowing how close I am to running out of heap and levels of nesting.
Yes, check out the limits methods in the Apex documentation