Wireshark-commits: [Wireshark-commits] master-1.12 5ca5704: Simplify the calculation of the time st
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 21 Apr 2015 02:05:08 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=5ca5704b62c3d8744f8caca7ad28f18a0707cb3d
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark

Commits:

5ca5704 by Guy Harris (guy@xxxxxxxxxxxx):

    Simplify the calculation of the time stamp.
    
    The time is calculated based on a 32-bit "seconds since the Epoch" value
    for the start time and a 32-bit delta from that time, in milliseconds.
    We can just split that delta into seconds and milliseconds, add the
    seconds to the start time to get the seconds part of the time stamp, and
    multiply the milliseconds by 1,000,000 to get the nanoseconds part of
    the time stamp.  The only 64-bit arithmetic needed is adding the seconds
    to a 64-bit version of the start time (just in case seconds+start time
    goes past Y2.038K).
    
    Change-Id: Id7c4c6255870627f81fc99dae919abaf47efc710
    Reviewed-on: https://code.wireshark.org/review/8132
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit ff4ca0adb9b9d5d03cb2d8a43b19c003267fc5fc)
    Reviewed-on: https://code.wireshark.org/review/8155
    

Actions performed:

    from  31c21be   Use 64-bit fixed point to calculate time stamps.
    adds  5ca5704   Simplify the calculation of the time stamp.


Summary of changes:
 wiretap/visual.c |   19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)