So, there are 2 clocks. One internal within the board that sleeps, one within the computer it communicates with. When board goes to sleep, it counts to 20 seconds and wakes up. However, while the count is correct, the time in the real world differs more and more with each deep sleep. Observe: http://pastebin.com/HqvcPXTp
The board that sleeps communicates to my computer this data: RTCtime (time that keeps counting through sleep), and regular up time (since it woken up). As you see, the board shows that it sleeps pretty much 20 seconds, give or take a few. It communicates with the computer within like 4 seconds since it wakes up. However, the always on computer shows a difference in seconds between each communication. It becomes more and more pronounced that the sleep becomes longer, the sleeping board still thinks it sleeps only 20 seconds, but the always on computer now counts 1000 seconds between each communication.
It is like my sleeping board is a satellite rushing through space at enormous speeds approaching speed of light. As it gets faster, the time dilation happens..
Well, jokes aside... Did I get a buggy board?
Here is my code in Lua:
Client that sleeps: http://pastebin.com/7m7GbWWT
The server that stays up: http://pastebin.com/nZu4vzCM
Note that I changed wifi id and password, if you run, make sure password is at least 8 chars.