aboutsummaryrefslogtreecommitdiffstats
path: root/summary.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-24 21:31:56 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-24 21:31:56 +0000
commite7e62591fe23566d2bb5685ade31d2a925ed726c (patch)
tree7be99a00405385c14e1606c31906463d60107655 /summary.c
parent6f063a4571dad2e3d8681d4ce6b1114bcc1b811b (diff)
EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15520 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/summary.c b/summary.c
index 511cf47f18..b21706c6be 100644
--- a/summary.c
+++ b/summary.c
@@ -34,18 +34,12 @@
#endif
-static double
-secs_usecs( guint32 s, guint32 us)
-{
- return (us / 1000000.0) + (double)s;
-}
-
static void
tally_frame_data(frame_data *cur_frame, summary_tally *sum_tally)
{
double cur_time;
- cur_time = secs_usecs(cur_frame->abs_secs, cur_frame->abs_usecs);
+ cur_time = nstime_to_sec(&cur_frame->abs_ts);
if (cur_time < sum_tally->start_time) {
sum_tally->start_time = cur_time;
@@ -94,8 +88,8 @@ summary_fill_in(capture_file *cf, summary_tally *st)
/* initialize the tally */
if (cf->plist != NULL) {
first_frame = cf->plist;
- st->start_time = secs_usecs(first_frame->abs_secs,first_frame->abs_usecs);
- st->stop_time = secs_usecs(first_frame->abs_secs,first_frame->abs_usecs);
+ st->start_time = nstime_to_sec(&first_frame->abs_ts);
+ st->stop_time = nstime_to_sec(&first_frame->abs_ts);
cur_glist = cf->plist;
for (i = 0; i < cf->count; i++) {
@@ -110,7 +104,7 @@ summary_fill_in(capture_file *cf, summary_tally *st)
st->encap_type = cf->cd_t;
st->has_snap = cf->has_snap;
st->snap = cf->snap;
- st->elapsed_time = secs_usecs(cf->esec, cf->eusec);
+ st->elapsed_time = nstime_to_sec(&cf->elapsed_time);
st->packet_count = cf->count;
st->drops_known = cf->drops_known;
st->drops = cf->drops;