The timer is server-dependent so if you are not playing online you need to do so. Also, please check your device's date/time to make sure it is correct. If the system time is inaccurate it can cause timer errors too. 

If you use energy while not connected to the Internet and then turn off the device, the energy meter will not refill. The solution to this issue is to connect to the Internet and the meter will refill.

Note: The energy meter will refill if you are offline and the device remains on.

Make sure your device is not in "Airplane Mode" as this prevents the game from accessing the servers.
 
For best results you'll want to always use a reliable WiFi connection rather than 3G or 4G. 3G/4G can vary quite a bit depending on traffic in your area and may not be reliable at times. Having high "bars" indicates good signal strength but may not reflect actual throughput.
 
Even if you have good signal strength showing for your WiFi connection, your bandwidth may be limited if the network is congested. (For example, if there are many other users sharing the network and/or others are doing bandwidth-intensive activities such as streaming video.)  
 
There are free bandwidth test apps available wherever you normally download apps that you may want to check out, or you can conduct such tests through your device's web browser.