keep a function active for a specific time and if the the condition is true - end the look \ function
<p>this is abit messy so sorry about that,</p>

<p>i am new to C# so my question might be stupid, again sorry about that.</p>

<p>what i want to accomplished is something like that:</p>

<pre><code>            private void RivalAlive()
        // The Function Should be alive for 10min - if the condition is performed then the function need to die (quit) immediately, also if the 10min has passed without the condition beeing performed the function will die.
        {
            if (SmallHour == 5) // if condition is performed it need to execute the code in the condition and quit the function
            //Run Another Function Here
            //End the RivalAlive Function
        {
        }
            //If the Condition is False - keep with the loop every 1 sec till 10min has passed
        }
</code></pre>

<p>thanks alot!</p>
