<p>In <a href="https://github.com/OpenSIPS/opensips/pull/728#discussion_r48743615">modules/ratelimit/ratelimit.c</a>:</p>
<pre style='color:#555'>> +        /* Window ELement*/
> +        #define WEL(__el__) pipe->rwin.__el__
> +        #define U2MILI(__usec__) (__usec__/1000)
> +        #define S2MILI(__sec__) (__sec__ *1000)
> +        int i;
> +        int count;
> +        int first_good_index;
> +        int rl_win_ms = rl_window_size * 1000;
> +
> +
> +        unsigned long long now_total, start_total;
> +
> +        struct timeval tv;
> +
> +        /* first get values from our beloved replicated friends */
> +        count = rl_get_all_hist_counters(pipe);
</pre>
<p>You should use the <code>counter</code> field of the pipe.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/728/files#r48743615">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcibcfMyq6aU_zLWOTV5Cohd46qUNDks5pWowDgaJpZM4G3c6v.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/728/files#r48743615"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>