From daec29f69c06615fe746597a81c3bf87dafc820d Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Mon, 11 Nov 2013 13:39:32 -0500 Subject: [PATCH] Simulator: slow to 1/10th real-time Reduce the simulated timer to 1/10 actual time. There is no need for the simulator to run at full speed for now, and some PCs may not be able to attain real-time speed anyway due to PC clock speed, scheduler slack or OS differences. Maybe the simulated timer interrupt is not needed at all and some cooperative timer interrupt could be used instead. Such a setup may even run faster as it could also run >1.0x time when there is nothing to do. This bears investigation later. For now, the simulated timer interrupt seems more realistic and possibly valuable. --- simulator/timer_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulator/timer_ext.c b/simulator/timer_ext.c index d11f98c..3ff4d9b 100644 --- a/simulator/timer_ext.c +++ b/simulator/timer_ext.c @@ -9,7 +9,7 @@ #include // printf #include // usleep -#define TIME_SLOW_FACTOR 1 +#define TIME_SLOW_FACTOR 10 static void schedule_timer(uint32_t useconds);