Wait, so you want like the algorithm that determines that condition? 🤣. Yes, yes, silly Apple how could they leave that out.And there is code that will instruct the OS to turn off the screen after the set variable conditions are met, and that variable will have a number.
You cannot program with "a while," you have to have a specific formula/number.