ifAppManager.GetScreensaverTimeout() will tell you what the user's screensaver wait time is set to, zero if it's disabled.
ifAppManager.UpdateLastKeyPressTime() can be used to prevent the channel returning to the Home screen (ever), allowing the channel to run for many years continuously.
In Scene Graph applications, I believe the render thread does not run while the screensaver is active, so if you have a way for the render thread to communicate with a Task thread, which will continue running while the screensaver is running, you might be able to determine in your Task whether the screensaver is running or not, by the absence of such communication.