Check the remaining energy

Hey.
How can I know when the energy is running out?
So that after I can do other actions.