From: Jerome Forissier Date: Tue, 15 Apr 2025 21:17:39 +0000 (+0200) Subject: net: lwip: use timer_early_get_count() when CONFIG_SANDBOX_TIMER=y X-Git-Tag: v2025.07-rc1~35^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bebe7fe3eebe328ca0bbf46c5dedf6791d5b2769;p=pandora-u-boot.git net: lwip: use timer_early_get_count() when CONFIG_SANDBOX_TIMER=y When the sandbox timer is available, use it. This allows skipping time in the tests (sandbox_eth_skip_timeout()). Signed-off-by: Jerome Forissier Reviewed-by: Simon Glass --- diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c index d566f9f8e6b..f05c4cd3f64 100644 --- a/net/lwip/net-lwip.c +++ b/net/lwip/net-lwip.c @@ -14,6 +14,7 @@ #include #include #include +#include /* xx:xx:xx:xx:xx:xx\0 */ #define MAC_ADDR_STRLEN 18 @@ -339,7 +340,11 @@ int net_loop(enum proto_t protocol) u32_t sys_now(void) { +#if CONFIG_IS_ENABLED(SANDBOX_TIMER) + return timer_early_get_count(); +#else return get_timer(0); +#endif } int net_start_again(void)