Can I check if the game freezes?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MaaaxiKing

I want to do something if the game freezes or rather do something after it doesn’t freeze anymore.

:bust_in_silhouette: Reply From: Trollend

I could be wrong, but I believe the answer to your question is no.

The game “freezing” could be it performing computations in the background, and thus it seems to pause and not accept user input, as it is currently running something. If you wanted to do something before or after this “freeze” you would need to identify the points in your code that the pause begins and ends, which you could do with print statements.

If the game freezing is actually freezing, meaning no code is being executed during this time, then there is no piece of code you could run, since no code is being executed. Additionally, what would bring it out of this freeze state? If it really is freezing, the program shouldn’t randomly resume execution later, and if that is what it does then it’s really just executing code in the background. But once again, you can determine this with print statements.