aboutsummaryrefslogtreecommitdiffstats
path: root/capinfos.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-08-24 21:31:56 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-08-24 21:31:56 +0000
commit6f43fbb2f088438dae20d4007df830863391b1c6 (patch)
tree7be99a00405385c14e1606c31906463d60107655 /capinfos.c
parentef81f7d060f39b43cc8eadf86c8e965a3e820225 (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... svn path=/trunk/; revision=15520
Diffstat (limited to 'capinfos.c')
-rw-r--r--capinfos.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/capinfos.c b/capinfos.c
index 60c73de3b3..0a27f0cd80 100644
--- a/capinfos.c
+++ b/capinfos.c
@@ -83,9 +83,9 @@ typedef struct _capture_info {
} capture_info;
static double
-secs_usecs(guint32 s, guint32 us)
+secs_nsecs(const struct wtap_nstime * nstime)
{
- return (us / 1000000.0) + (double)s;
+ return (nstime->nsecs / 1000000000.0) + (double)nstime->secs;
}
static void
@@ -131,7 +131,7 @@ process_cap_file(wtap *wth, const char *filename)
/* Tally up data that we need to parse through the file to find */
while (wtap_read(wth, &err, &err_info, &data_offset)) {
phdr = wtap_phdr(wth);
- cur_time = secs_usecs(phdr->ts.tv_sec, phdr->ts.tv_usec);
+ cur_time = secs_nsecs(&phdr->ts);
if(packet==0) {
start_time = cur_time;
stop_time = cur_time;