"DEEP_SLEEP: Only RTC is powered on" (But, unfortunately, Espressif doesn't provide much details, even the RTC is now shown in the block diagram, so, that's why it confused me)
Then page 18 of the programming guide says ..
3.2.13. system_get_rtc_time
Function:Get RTC time , count by RTC clock period.
Example: If system_get_rtc_time returns 10 (means 10 RTC cycles),
system_rtc_clock_cali_proc returns 5 (means 5us per RTC cycle), then real
time is 10 x 5 = 50 us.
Note: System time will return to zero because of deep sleep or system_restart,
but RTC still goes on.
Prototype:
uint32 system_get_rtc_time(void)
Parameter:
Null
Return:
RTC time.
Document "2C_ESP8266__Programming Guide" updates:
1.Update Demo code of rtc timer in appendix, and rtc timer will return to zero after deep-sleep wake up. [andrew]