Code:
choice ESP8266_TIME_SYSCALL
prompt "Timers used for gettimeofday function"
default ESP8266_TIME_SYSCALL_USE_FRC1
help
This setting defines which hardware timers are used to
implement 'gettimeofday' and 'time' functions in C library.
- If high-resolution timer is used, gettimeofday will
provide time at microsecond resolution.
Time will not be preserved when going into deep sleep mode.
- If no timers are used, gettimeofday and time functions
return -1 and set errno to ENOSYS.
Code:
int64_t esp_timer_get_time(void) {
extern uint64_t g_esp_os_us;
return (int64_t)(g_esp_os_us + soc_get_ccount() / g_esp_ticks_per_us);
}
Statistics: Posted by mriksman — Thu Apr 23, 2020 12:32 am
Statistics: Posted by mriksman — Wed Apr 22, 2020 9:09 pm