From 2c591a5e97ad9f354844d3d2b04a4190f9c6fc1f Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 29 May 2022 20:26:30 +0200 Subject: fix memory leak and print sim info over stderr --- robot/hypervisor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'robot/hypervisor.c') diff --git a/robot/hypervisor.c b/robot/hypervisor.c index e781877..3359bf6 100644 --- a/robot/hypervisor.c +++ b/robot/hypervisor.c @@ -44,9 +44,9 @@ void w2_hypervisor_main() { #ifdef W2_SIM if (DBG_ENABLE_CYCLEINFO) siminfo("cycle end\n"); - if (!g_w2_sim_headless) usleep(100e3); + if (DBG_CYCLE_DELAY > 0) usleep(DBG_CYCLE_DELAY); - if (g_w2_sim_headless && DBG_MAX_CYCLES > -1 && g_w2_hypervisor_cycles > DBG_MAX_CYCLES) + if (DBG_MAX_CYCLES > -1 && g_w2_hypervisor_cycles > DBG_MAX_CYCLES) exit(0); #endif -- cgit v1.2.3