duktape has no equivalent of JS_IsRunning() so use the state of the timeout tracking bits to approximate it.