From 1db17acc03a8302521d78bbba5d525b1137df1e9 Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Sun, 10 Nov 2013 19:47:08 -0500 Subject: [PATCH] Simulator: don't try to schedule zero time. --- simulator/timer_ext.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/simulator/timer_ext.c b/simulator/timer_ext.c index 345eb6f..6911d22 100644 --- a/simulator/timer_ext.c +++ b/simulator/timer_ext.c @@ -155,6 +155,9 @@ void sim_setTimer() { //-- Convert ticks to microseconds long actual = ((unsigned long)next) * TIME_SLOW_FACTOR / (1 US); + if ( next && !actual) + actual++; + if (next) { sim_debug("OCR1A:%04X OCR1B:%04X now=%04X", OCR1A, OCR1B, now ); sim_debug(" next=%u real=%u", next, actual);