[rate_ctr] always 'overflow' in next larger inetrval when interval ends
authorHarald Welte <laforge@gnumonks.org>
Thu, 13 May 2010 11:28:12 +0000 (13:28 +0200)
committerHarald Welte <laforge@gnumonks.org>
Thu, 13 May 2010 11:28:12 +0000 (13:28 +0200)
commitd2dce6df04c859e33a79685640ad0a295dcc1421
tree2583303f3624bb1431a6c1ac9904eaaa0bae0194
parentcf734784b0433dfa6b77909f83cc3620e523f5d7
[rate_ctr] always 'overflow' in next larger inetrval when interval ends

If a second ends, we add the number of events in that just-ended second
to the number of events in the currently running minute.  The same happens
at the end of a minute: We add the number of events in that just-ended
minute into the number of events of the still-running hour, etc.

This gives a much more meaningful numbers and we don't end up with
"12 events per second, but 0 events per minute" kind of situations
anymore.
src/rate_ctr.c