Wireshark-commits: [Wireshark-commits] master-1.10 12d4f99: Simplify the calculation of the time st

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 21 Apr 2015 02:09:35 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=12d4f99740603be414ba0a82438ef1aaaac32f10
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-1.10
Repository: wireshark

Commits:

12d4f99 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: I6b3319ec73f1fd49dd59435d0a2ccc2365edf986
    Reviewed-on: https://code.wireshark.org/review/8156
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  51df8ae   Use 64-bit fixed point to calculate time stamps.
    adds  12d4f99   Simplify the calculation of the time stamp.


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