interval to double

Vern Paxson vern at
Sat Jun 23 02:07:15 PDT 2001

> I have:
> - a packet counter
> - an interval
> - a threshold of packet per second.
> When I multiplie the interval with the threshold the result is an interval.
> I want to compare the result with the counter (of count type).
> Is there a converter (interval->count/int) or a smarter way to do it?

Ouch, no, there's no real way to do this.  Probably the easiest solution
would be to add interval<->double converters.  This is actually simple
to do, if you look in at how bro_to_net is defined and exported,
and do the analogous operations.


More information about the Bro mailing list