aboutsummaryrefslogtreecommitdiff
path: root/src/Inputs.cc
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-07-02 10:25:56 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-07-02 10:25:56 +0200
commitd6db829f9d98bb909107f08b0461272b2c21ab0e (patch)
tree42fb64f37c03a338c4bbca184dd4bb07b71783df /src/Inputs.cc
parent4d107863208d72ee755b6de2392bcba0372a40fa (diff)
Debug simulator
Diffstat (limited to 'src/Inputs.cc')
-rw-r--r--src/Inputs.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Inputs.cc b/src/Inputs.cc
index 0781be8..e9f48f0 100644
--- a/src/Inputs.cc
+++ b/src/Inputs.cc
@@ -101,6 +101,7 @@ double Inputs::GetHintTS(double clock){
if(wake_ts[i]>=(clock+hintdist))
return(wake_ts[i]);
}
+ return(wake_ts.back());
}
return(GetNextTS());
}
@@ -111,6 +112,7 @@ double Inputs::GetHintDuration(double clock){
if(wake_ts[i]>=(clock+hintdist))
return(wake_duration[i]);
}
+ return(wake_duration.back());
}
return GetNextDuration();
}
@@ -122,9 +124,9 @@ void Inputs::GotoNextEvent(){
void Inputs::ResetEvents(double clock){
wake_ts=wake_ts_backup;
- wake_duration=wake_duration_backup;;
+ wake_duration=wake_duration_backup;
// Restore current event
- while(HasNext() && (GetTS()+GetNextDuration()) < clock){
+ while(HasNext() && (GetNextTS()+GetNextDuration()) < clock){
GotoNextEvent();
}
}