Skip to content

Commit

Permalink
Add delay to payload loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemann committed Apr 23, 2024
1 parent 0462501 commit 0b5cb3f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sequence.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,12 @@ void *thread_hdl(void *temp)

// Increment total bytes for sequence so far.
__sync_add_and_fetch(&total_data[ti->seq_cnt], pckt_len[i]);

// Check for delay.
if (ti->seq.delay > 0)
{
usleep(ti->seq.delay);
}
}

// Check packet count.
Expand Down Expand Up @@ -619,12 +625,6 @@ void *thread_hdl(void *temp)
break;
}
}

// Check for delay.
if (ti->seq.delay > 0)
{
usleep(ti->seq.delay);
}
}

// Cleanup AF_XDP socket.
Expand Down

0 comments on commit 0b5cb3f

Please sign in to comment.