这有点混乱,对此感到抱歉,
我是 C# 新手,所以我的问题可能很愚蠢,再次对此感到抱歉。
我想要完成的是这样的:
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
}
多谢!