On 1/28/10 6:27 PM, Klaus Darilion wrote:
Daniel-Constantin Mierla schrieb:
Module: sip-router
Branch: master
Commit: 40a183b716853a08b523349b92a8d4ad0470e360
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=40a183b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Jan 27 23:17:59 2010 +0100
pv(k): added new PV class to get timeval attributes
- $TV(s) - struct timeval tv_sec (cached per sip message)
- $TV(u) - struct timeval tv_usec (cached per sip message)
- $TV(sn) - struct timeval tv_sec (not cached)
- $TV(un) - struct timeval tv_usec (not cached)
Who does uncached timeval work?
e.g.: $avp{time}=$TV(sn) + "." + $TV(un).
What happens if timeval is 0.999999 when calling $TV(sn) and timeval
is 1.000000 when calling $TV(un)? Will the result be "0.0"?
yes, so use
cached :-).
uncached is good if you use only one of attributes, maybe to measure the
diff between two calls or print it in logs.
Cheers,
Daniel
--
Daniel-Constantin Mierla
*
http://www.asipto.com/