I have an application that keeps a long-standing network connection to a server.
I periodically ping the server to know if its still alive.
I imagine that it affects battery life, but other than trying to wall-clock time the time between charges, I don't have a good way of quantifying this.
Is there a mechanism for being told when the CPU 'wakes up', or when it wants to go to sleep?
Is there a standard way of doing long standing connections that minimises power consumption?