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 <jerome.forissier@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit bebe7fe3ee)
This commit is contained in:
Jerome Forissier
2025-04-15 23:17:39 +02:00
committed by Simon Glass
parent 42e5a78994
commit bc8ddf658c

View File

@@ -13,6 +13,7 @@
#include <lwip/init.h>
#include <lwip/prot/etharp.h>
#include <net.h>
#include <timer.h>
/* xx:xx:xx:xx:xx:xx\0 */
#define MAC_ADDR_STRLEN 18
@@ -325,7 +326,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)