diff options
Diffstat (limited to 'src/grt/grt-processes.adb')
-rw-r--r-- | src/grt/grt-processes.adb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/grt/grt-processes.adb b/src/grt/grt-processes.adb index feb3123..242a9e5 100644 --- a/src/grt/grt-processes.adb +++ b/src/grt/grt-processes.adb @@ -1088,6 +1088,17 @@ package body Grt.Processes is end if; exit when Status = Run_Finished; + if Next_Time > Stop_Time + and then Next_Time /= Std_Time'Last + then + -- FIXME: Implement with a callback instead ? This could be done + -- in 2 steps: an after_delay for the time and then a read_only + -- to finish the current cycle. Note that no message should be + -- printed if the simulation is already finished at the stop time. + Info ("simulation stopped by --stop-time"); + exit; + end if; + if Current_Delta = 0 then Grt.Hooks.Call_Cycle_Hooks; end if; |