[Snort-devel] Run time is incorrectly displayed

Bart Haagdorens Bart.Haagdorens at ...2220...
Mon Dec 8 08:07:05 EST 2003


Hi,

snort 2.0.5, snort.c, line 1547:

    printf("Run time for packet processing was %lu.%lu seconds\n", 
            difftime.tv_sec, difftime.tv_usec);

This is clearly quite incorrect. A time of 8 seconds and 65 microseconds is
shown as 8.65 instead of 8.000065. 

It would be more convenient to use printf format specifiers to include
leading zeroes before the microseconds:

    printf("Run time for packet processing was %lu.%06lu seconds\n", 
            difftime.tv_sec, difftime.tv_usec);

Hope someone can fix this.

Regards,

Bart Haagdorens
_________________________________
Bart Haagdorens
Vrije Universiteit Brussel
TW-INFO
Pleinlaan 2
B-1050 Brussels
Belgium

bart.haagdorens at ...2220...

Tel: +32 2 629 24 94
GSM: +32 477 69 77 21








More information about the Snort-devel mailing list