How long is a thread allow to sit idle until it gets auto-locked?

Kinda drifted away from rewriting some code into C, mainly due to certain parts that are essential in the original MC68HC11 assembly code having no practical equivalent in C++ (i.e., use of the carry bit in some math operations and also bit-roll operators).

I had been asked in this now closed thread about some code: Interrupt code

    ASL    BCHsum
    BIT #1
    BEQ    nmi71
    LDA BCHsum
    BIT #64
    BNE    nmi73
    JMP nmi72
    LDA BCHsum
    BIT #64
    BEQ    nmi73
    EOR #3
    AND #63
    STA BCHsum
But after much thought, I am just going to set this project aside.
As mentioned, there are parts of the code that simply will not cleanly translate to C++. That and the goal of this was to pour it into an Arduino module, and I learned that there are various failsafes built into its environment, which could have an impact on the overall timing (while not cycle precise, the code would need to keep up with the 2.4kHz input clock and be able to stay in sync with the 12.5kHz output clock, so that means staying with assembly).
I did this project to see if I could do it, and there is just too big a gulf between what I'm starting with and the various solutions available to me.
I did my best, I have other non-technical projects that now need my attention, unless there was something obvious I overlooked.