Changeset 12140


Ignore:
Timestamp:
Mar 12, 2011, 10:45:14 PM (12 years ago)
Author:
jch
Message:

Revert "Protect against broken implementations of monotonic time."

There are other instances of GetMicroseconds? in the code, so a proper
paranoiac would want to work around that at a lower level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/third-party/libutp/utp.cpp

    r12117 r12140  
    18941894                int seq = conn->seq_nr - conn->cur_window_packets + i;
    18951895                OutgoingPacket *pkt = (OutgoingPacket*)conn->outbuf.get(seq);
    1896                 int64 rtt;
    18971896                if (pkt == 0 || pkt->transmissions == 0) continue;
    18981897                assert((int)(pkt->payload) >= 0);
    18991898                acked_bytes += pkt->payload;
    1900                 rtt = UTP_GetMicroseconds() - pkt->time_sent;
    1901                 if(rtt < 0) {
    1902                         LOG_UTP("UTP_GetMicroseconds decreased (%ld > %ld).  "
    1903                                 "This should not happen.",
    1904                                 (long)pkt->time_sent,
    1905                                 (long)(pkt->time_sent + rtt));
    1906                         rtt = 0;
    1907                 }
    1908                 min_rtt = min<int64>(min_rtt, rtt);
     1899                min_rtt = min<int64>(min_rtt, UTP_GetMicroseconds() - pkt->time_sent);
    19091900        }
    19101901       
Note: See TracChangeset for help on using the changeset viewer.