aboutsummaryrefslogtreecommitdiff
path: root/sim/common/hw-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/common/hw-events.c')
-rw-r--r--sim/common/hw-events.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c
index 31c5a40..f60dfa3 100644
--- a/sim/common/hw-events.c
+++ b/sim/common/hw-events.c
@@ -164,6 +164,15 @@ hw_event_queue_time (struct hw *me)
return sim_events_time (hw_system (me));
}
+/* Returns the time that remains before the event is raised. */
+signed64
+hw_event_remain_time (struct hw *me, struct hw_event *event)
+{
+ signed64 t;
+
+ t = sim_events_remain_time (hw_system (me), event->real);
+ return t;
+}
/* Only worry about this compling on ANSI systems.
Build with `make test-hw-events' in sim/<cpu> directory*/