aboutsummaryrefslogtreecommitdiffstats
path: root/epan/stats_tree.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 /epan/stats_tree.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 'epan/stats_tree.c')
-rw-r--r--epan/stats_tree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/stats_tree.c b/epan/stats_tree.c
index cb36ba2d26..47c94c53c8 100644
--- a/epan/stats_tree.c
+++ b/epan/stats_tree.c
@@ -52,7 +52,7 @@ extern void stats_tree_get_strs_from_node(const stat_node* node, guint8* value,
if (rate) {
*rate = '\0';
if (node->st->elapsed > 0.0) {
- f = ((float)node->counter) / node->st->elapsed;
+ f = ((float)node->counter) / (float)node->st->elapsed;
g_snprintf(rate,NUM_BUF_SIZE,"%f",f);
}
}
@@ -306,13 +306,13 @@ extern stats_tree* stats_tree_new(stats_tree_cfg* cfg, tree_pres* pr,char* filte
/* will be the tap packet cb */
extern int stats_tree_packet(void* p, packet_info* pinfo, epan_dissect_t *edt, const void *pri) {
stats_tree* st = p;
- float now;
+ double now;
if (st->highest_seen >= pinfo->fd->num) return 0;
st->highest_seen = pinfo->fd->num;
-
- now = (((float)pinfo->fd->rel_secs) + (((float)pinfo->fd->rel_usecs)/1000000) );
+
+ now = nstime_to_msec(&pinfo->fd->rel_ts);
if (st->start < 0.0) st->start = now;