Simulator: don't try to schedule zero time.
This commit is contained in:
parent
2b8a5d3b5a
commit
1db17acc03
|
|
@ -155,6 +155,9 @@ void sim_setTimer() {
|
||||||
|
|
||||||
//-- Convert ticks to microseconds
|
//-- Convert ticks to microseconds
|
||||||
long actual = ((unsigned long)next) * TIME_SLOW_FACTOR / (1 US);
|
long actual = ((unsigned long)next) * TIME_SLOW_FACTOR / (1 US);
|
||||||
|
if ( next && !actual)
|
||||||
|
actual++;
|
||||||
|
|
||||||
if (next) {
|
if (next) {
|
||||||
sim_debug("OCR1A:%04X OCR1B:%04X now=%04X", OCR1A, OCR1B, now );
|
sim_debug("OCR1A:%04X OCR1B:%04X now=%04X", OCR1A, OCR1B, now );
|
||||||
sim_debug(" next=%u real=%u", next, actual);
|
sim_debug(" next=%u real=%u", next, actual);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue