Skip to content

Commit 20890b2

Browse files
authored
Merge pull request #35 from edi-riga/fix/packet-source-randomization
fix variable name in packet_source.mjs
2 parents 29ede3d + 5da50d6 commit 20890b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/packet_source.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class PacketSource {
8686
}
8787

8888
/* add the first timer */
89-
if (!this.is_fixed) {
89+
if (this.is_randomized) {
9090
this.timer_time += rng.random() * this.period;
9191
}
9292
time.add_timer(this.timer_time, false, this, function(ps) {
@@ -123,7 +123,7 @@ export class PacketSource {
123123
}
124124

125125
/* add the next timer */
126-
if (this.is_fixed) {
126+
if (!this.is_randomized) {
127127
/* simply schedule it after the period */
128128
this.timer_time = this.period;
129129
time.add_timer(this.timer_time, false, this, function(ps) {

0 commit comments

Comments
 (0)