Skip to content

Commit

Permalink
PeriodicGate: Cosmetics.
Browse files Browse the repository at this point in the history
  • Loading branch information
levy committed Jul 15, 2024
1 parent 8068407 commit 25617d4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/inet/queueing/gate/PeriodicGate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ void PeriodicGate::initializeGating()
{
index = 0;
isOpen_ = initiallyOpen;
if (totalDuration.raw() == 0) {
if (totalDuration.raw() == 0)
offset.setRaw(0);
} else {
else
offset.setRaw((initialOffset.raw() % totalDuration.raw() + totalDuration.raw()) % totalDuration.raw());
}
while (offset > CLOCKTIME_ZERO) {
clocktime_t duration = durations[index];
if (offset >= duration) {
Expand Down

0 comments on commit 25617d4

Please sign in to comment.