[asterisk-bugs] [Asterisk 0011270]: [patch] ast_tvdiff_us

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Nov 17 08:41:52 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11270 
====================================================================== 
Reported By:                dimas
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11270
Category:                   General
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 89114 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-16-2007 07:08 CST
Last Modified:              11-17-2007 08:41 CST
====================================================================== 
Summary:                    [patch] ast_tvdiff_us
Description: 
Patch adds trivial function ast_tvdiff_us to get the difference between two
timeval instances in microseconds.
====================================================================== 

---------------------------------------------------------------------- 
 dimas - 11-17-07 08:41  
---------------------------------------------------------------------- 
My bad. This is result of extensive usage of Java where long is 64 bit...

I chosen 64 bits intentionally because time delta expressed in
microseconds can be very big value and 32 bit signed int can only represent
about 30 minutes. Obviously, where we need microsecond precision, we are
measuring very small intervals so even 32 bit int is ok. But I just didn't
want surprise someone who could use this function for long intervals.

I can fix the patch in both ways but I would prefer "true" 64 bits. What
do you think? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-17-07 08:41  dimas          Note Added: 0073845                          
======================================================================




More information about the asterisk-bugs mailing list