From: Angus Gratton Date: Thu, 20 Jul 2017 00:14:07 +0000 (+1000) Subject: newlib: Avoid deprecation warning calling system_get_time() from system_relative_time() X-Git-Tag: v3.1-dev~302^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8339fc1bdb58c948e62c02eb4d30c11758c89ca;p=esp-idf newlib: Avoid deprecation warning calling system_get_time() from system_relative_time() --- diff --git a/components/newlib/time.c b/components/newlib/time.c index 1655c0b8e6..c6a1e70247 100644 --- a/components/newlib/time.c +++ b/components/newlib/time.c @@ -229,7 +229,11 @@ uint32_t system_get_current_time(void) __attribute__((alias("system_get_time"))) uint32_t system_relative_time(uint32_t current_time) { - return system_get_time() - current_time; +#if defined( WITH_FRC1 ) || defined( WITH_RTC ) + return get_time_since_boot() - current_time; +#else + return 0; +#endif } uint64_t system_get_rtc_time(void)