MEDIUM: freq_ctr: reimplement freq_ctr_remain_period() from freq_ctr_total()
authorWilly Tarreau <w@1wt.eu>
Sun, 11 Apr 2021 08:42:28 +0000 (10:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Apr 2021 09:11:03 +0000 (11:11 +0200)
commit607be24a85f8c21c1d1528727e2e68f96f7d859b
treeb2ad20fd79bdb96759d5f9b2cb4d36d715da1109
parenta7a31b26023a428e50cf348635f08c0f7ff50d8b
MEDIUM: freq_ctr: reimplement freq_ctr_remain_period() from freq_ctr_total()

Now the function becomes an inline one and only contains a divide and
a max. The divide will automatically go away with constant periods.
include/haproxy/freq_ctr.h
src/freq_ctr.c