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.



On Thu, May 1, 2014 at 3:06 PM, Maciej Bylica <[email protected]> wrote:

> Could somebody tell me a few words answering on my questions?
>
> Thanks.
>
>
> 2014-04-30 12:46 GMT+02:00 Maciej Bylica <[email protected]>:
>
> Hi
>>
>> Right, i need ceiling function = to get smallest integral value not less
>> than argument.
>>
>> Thanks
>>
>>
>> that's not "round", that's "ceiling"
>>> ceil(0.0000000000000001,0)= 1
>>> round(0.0000000000000001,0)= 0
>>>
>>>
>>> 2014-04-29 19:22 GMT-03:00 Maciej Bylica <[email protected]>:
>>>
>>>> Frankly such precision is not needed.
>>>> As i saw call duration is rounded mathematically, but sometimes in
>>>> telco world (my case) 0.1sec call should be counted as 1sec call.
>>>> 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, ...)
>>>>
>>>> Thanks
>>>> Mac.
>>>>
>>>>
>>>> 2014-04-28 3:36 GMT+02:00 Aamir <[email protected]>:
>>>>
>>>>> Is there a need ?
>>>>>
>>>>>
>>>>> Thanks & Regards,
>>>>>
>>>>> Aamir Chougule
>>>>> Cell: 08097989101
>>>>> Skype-ID: aamir_ryu
>>>>>
>>>>> --- Sent from my BlackBerry ---
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: [email protected]
>>>>> Sender: [email protected]
>>>>> Date: Sun, 27 Apr 2014 19:18:04
>>>>> To: OpenSIPS users mailling list<[email protected]>
>>>>> Reply-To: OpenSIPS users mailling list <[email protected]>
>>>>> Subject: Re: [OpenSIPS-Users] Miliseconds precision for accounting
>>>>> module
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> [email protected]
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> [email protected]
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [email protected]
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>
>>>
>>> --
>>> Roberto Spadim
>>> SPAEmpresarial
>>> Eng. Automação e Controle
>>>
>>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to