From 8aecad287c464e41061809924ad36a03e39767aa Mon Sep 17 00:00:00 2001 From: ligd Date: Fri, 3 Feb 2023 22:12:36 +0800 Subject: [PATCH] sim: set loop task duration to 10ms Signed-off-by: ligd --- arch/sim/Kconfig | 6 ++++++ arch/sim/src/sim/sim_initialize.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/sim/Kconfig b/arch/sim/Kconfig index 9547d3cb2c..d221f2ba0e 100644 --- a/arch/sim/Kconfig +++ b/arch/sim/Kconfig @@ -140,6 +140,12 @@ config SIM_WALLTIME_SIGNAL endchoice +config SIM_LOOPTASK_INTERVAL + int "looptask interval in us" + default 10000 + ---help--- + Looptask sleep time + config SIM_STACKSIZE_ADJUSTMENT int "The adjustment of stack size for sim" default 65536 diff --git a/arch/sim/src/sim/sim_initialize.c b/arch/sim/src/sim/sim_initialize.c index ade385e3e8..9ae9df4e58 100644 --- a/arch/sim/src/sim/sim_initialize.c +++ b/arch/sim/src/sim/sim_initialize.c @@ -218,7 +218,7 @@ static int sim_loop_task(int argc, char **argv) /* Sleep minimal time, let the idle run */ - usleep(USEC_PER_TICK); + usleep(CONFIG_SIM_LOOPTASK_INTERVAL); } return 0;