Problem with time function- Base time reference.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for your answer.

The problem here is that I need msec so I am using milliseconds through this
macro :

#define PJ_TIME_VAL_MSEC(t)    ((t).sec * 1000 + (t).msec)          the
output size is 32 bits so  I am losing some resolution.

*31 536 000* seconds so in msec 31 536 000 000 that is more that the maximum
value that can be stored inside a 32 bit variable.

2^32 = 4 294 967 296

Is it possible to store this value inside a 32 bits variable or should I use
a pj_time_val variable?

Regards

Jorge

2011/6/17 Jens Jorgensen <jbj1 at ultraemail.net>

> **
> Generally speaking such values in seconds are in seconds since The Epoch
> (Jan 1 1970 GMT).
>
> On 6/17/11 10:24 PM, Jorge wrote:
>
> Hello:
>
> I would like to delay a process so I am using this function to calculate
> the delay I should use pj_gettimeofday. I have read the documentation :
>
>   pj_status_t<http://www.pjsip.org/pjlib/docs/html/group__PJ__BASIC.htm#gab43ba3167bd2a2ab4580509dbf79200e>pj_gettimeofday
> ( pj_time_val<http://www.pjsip.org/pjlib/docs/html/structpj__time__val.htm>*
> *tv*  )
>
> Get current time of day in local representation.
>  *Parameters:*
>  *tv*  Variable to store the result.    *Returns:* zero if successful.
>
> But what I don?t know which is the base time that this function is taken as
> a reference. Because if it is a day I will have a problem at 00:00 h at
> night.
>
> Could you say to me if it is taken as a reference an hour reference, a day
> reference or a year reference?
>
> Regards
>
> Jorge
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing listpjsip at lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
> --
> Jens B. Jorgensenjbj1 at ultraemail.net
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110620/ae3c4e3a/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux