Skip to content

Commit

Permalink
ensure trace never has any overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Dec 5, 2013
1 parent ca78c94 commit 0d427ba
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 @@ -205,7 +205,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 0d427ba

Please sign in to comment.