summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hw/ptimer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ptimer.c b/hw/ptimer.c
index 7dd6d3110a..356fad7b6f 100644
--- a/hw/ptimer.c
+++ b/hw/ptimer.c
@@ -100,6 +100,9 @@ void ptimer_set_count(ptimer_state *s, uint64_t count)
 
 void ptimer_run(ptimer_state *s, int oneshot)
 {
+    if (s->enabled) {
+        return;
+    }
     if (s->period == 0) {
         fprintf(stderr, "Timer with period zero, disabling\n");
         return;