<div dir="ltr">Unless a developer can tell you otherwise, the Unix call that Opensips uses to get the current time already gives you a floored integer value of seconds. In other words, it's already doing what you need, you don't need to look into milliseconds or finer precision. Except it does floor instead of ceiling, so add +1. Do an experiment yourself with a call duration of 0.4, 0.9, 1.1 seconds, etc, and you can characterize it reliably.<div>
<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 1, 2014 at 3:06 PM, Maciej Bylica <span dir="ltr"><<a href="mailto:mbsip@gazeta.pl" target="_blank">mbsip@gazeta.pl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Could somebody tell me a few words answering on my questions?<div><br></div><div>Thanks.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-04-30 12:46 GMT+02:00 Maciej Bylica <span dir="ltr"><<a href="mailto:mbsip@gazeta.pl" target="_blank">mbsip@gazeta.pl</a>></span>:<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<div><br></div><div>Right, i need ceiling function = to get smallest integral value not less than argument.</div><div>
<br></div><div>Thanks</div><div><div><div><br><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">that's not "round", that's "ceiling"<div>ceil(0.0000000000000001,0)= 1<br></div><div>round(0.0000000000000001,0)= 0<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-04-29 19:22 GMT-03:00 Maciej Bylica <span dir="ltr"><<a>mbsip@gazeta.pl</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Frankly such precision is not needed.<div>As i saw call duration is rounded mathematically, but sometimes in telco world (my case) 0.1sec call should be counted as 1sec call.</div><div>Thats why i wanted to have milisec precision to be able to round durations by myself...(1.01 = 2secs, 1.49 = 2secs, 1.99=2secs, ...)</div>
<div><br></div><div>Thanks</div><div>Mac.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-28 3:36 GMT+02:00 Aamir <span dir="ltr"><<a>aamir_ryu@yahoo.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there a need ?<br>
<br>
<br>
Thanks & Regards,<br>
<br>
Aamir Chougule<br>
Cell: 08097989101<br>
Skype-ID: aamir_ryu<br>
<br>
--- Sent from my BlackBerry ---<div><br>
<div><div><br>
-----Original Message-----<br>
From: <a>ag@ag-projects.com</a><br>
Sender: <a>users-bounces@lists.opensips.org</a><br>
Date: Sun, 27 Apr 2014 19:18:04<br>
To: OpenSIPS users mailling list<<a>users@lists.opensips.org</a>><br>
Reply-To: OpenSIPS users mailling list <<a>users@lists.opensips.org</a>><br>
Subject: Re: [OpenSIPS-Users] Miliseconds precision for accounting module<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a>Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a>Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a>Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Roberto Spadim<br>SPAEmpresarial<div>Eng. Automação e Controle</div></div>
</div>
</blockquote></div>
</div></div></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div>