Skip to content

Commit

Permalink
Merge pull request #10 from appneta/Enhancement_improve_--mbps_option…
Browse files Browse the repository at this point in the history
…_stability_and_performance

ensure trace never has any overhead
  • Loading branch information
fklassen committed Dec 5, 2013
2 parents d3eb0a7 + 0d427ba commit 4304bcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/send_packets.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ send_packets(pcap_t *pcap, int cache_file_idx)
if (!do_not_timestamp && !skip_length)
get_packet_timestamp(&end);

#ifdef TIMESTAMP_TRACE
add_timestamp_trace_entry(pktlen, &end, skip_length);
#endif
/*
* track the time of the "last packet sent". Again, because of OpenBSD
* we have to do a memcpy rather then assignment.
Expand Down
2 changes: 1 addition & 1 deletion src/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ do_sleep(struct timeval *time, struct timeval *last, int len, int accurate,
#ifdef DEBUG
static struct timeval totalsleep = { 0, 0 };
#endif
static struct timespec nap = { 0, 0 }; //, delta_time = {0, 0};
static struct timespec nap = { 0, 0 };
struct timeval nap_for;
struct timespec nap_this_time;
static u_int32_t send = 0; /* accellerator. # of packets to send w/o sleeping */
Expand Down

0 comments on commit 4304bcb

Please sign in to comment.