Wireshark-commits: [Wireshark-commits] master ff4ca0a: Simplify the calculation of the time stamp.
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 20 Apr 2015 07:14:24 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ff4ca0adb9b9d5d03cb2d8a43b19c003267fc5fc
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

ff4ca0a 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>
    

Actions performed:

    from  bba29dd   The previous change doesn't work; do it right.
    adds  ff4ca0a   Simplify the calculation of the time stamp.


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