aboutsummaryrefslogtreecommitdiff
path: root/sim/common/hw-events.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-07-27 11:37:34 +0000
committerAndrew Cagney <cagney@redhat.com>2000-07-27 11:37:34 +0000
commit38e64f358e2894319381e195c699c337b6dbb29d (patch)
treed64f93009c8dc1ce88106cfac6cbbe22d771e7b6 /sim/common/hw-events.c
parent0802cc4008d88503871f386dec0745bd199087e0 (diff)
downloadfsf-binutils-gdb-38e64f358e2894319381e195c699c337b6dbb29d.zip
fsf-binutils-gdb-38e64f358e2894319381e195c699c337b6dbb29d.tar.gz
fsf-binutils-gdb-38e64f358e2894319381e195c699c337b6dbb29d.tar.bz2
2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* sim-events.c (sim_events_remain_time): New function returning the time that remains before the event is raised. * hw-events.c (hw_event_remain_time): Likewise. * sim-events.h (sim_events_remain_time): Declare. * hw-events.h (hw_event_remain_time): Declare.
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*/