diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-07-27 11:37:34 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-07-27 11:37:34 +0000 |
commit | 38e64f358e2894319381e195c699c337b6dbb29d (patch) | |
tree | d64f93009c8dc1ce88106cfac6cbbe22d771e7b6 /sim/common/sim-events.c | |
parent | 0802cc4008d88503871f386dec0745bd199087e0 (diff) | |
download | gdb-38e64f358e2894319381e195c699c337b6dbb29d.zip gdb-38e64f358e2894319381e195c699c337b6dbb29d.tar.gz 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/sim-events.c')
-rw-r--r-- | sim/common/sim-events.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c index fa294a7..1866b2d 100644 --- a/sim/common/sim-events.c +++ b/sim/common/sim-events.c @@ -379,6 +379,19 @@ sim_events_elapsed_time (SIM_DESC sd) } +/* Returns the time that remains before the event is raised. */ +INLINE_SIM_EVENTS\ +(signed64) +sim_events_remain_time (SIM_DESC sd, sim_event *event) +{ + if (event == 0) + return 0; + + return (event->time_of_event - sim_events_time (sd)); +} + + + STATIC_INLINE_SIM_EVENTS\ (void) update_time_from_event (SIM_DESC sd) |